#include <string.h>
#include <stdio.h>

#define MAXN 500

char s[MAXN+1];

int dp[MAXN+1][MAXN+1];

void print_substr(FILE* fp, char* s, int i, int j) {
    char ch = s[j];
    s[j] = '\0';
    fprintf(fp, "%s", s+i);
    s[j] = ch;
}

int min(int a, int b) {
    return a<b?a:b;
}

int f(int i, int j) {
    if(dp[i][j] != -1) {
        return dp[i][j];
    }
    if(i == j) {
        dp[i][j] = 0;
        return 0;
    }
    int res = f(i+1, j) + 1;
    for(int k=i+1; k<j; ++k) {
        if(s[k] == s[i]) {
            res = min(res, f(i+1, k) + f(k, j));
        }
    }
    dp[i][j] = res;
    /*
    fprintf(stderr, "f(%d, %d) = f(", i, j);
    print_substr(stderr, s, i, j);
    fprintf(stderr, ") = %d\n", res);
    */
    return res;
}

int main() {
    int n;
#ifdef EKLAVYA
    scanf("%s", s);
    n = strlen(s);
#else
    scanf("%d", &n);
    scanf("%s", s);
#endif

    for(int i=0; i<=n; ++i) {
        for(int j=0; j<=n; ++j) {
            dp[i][j] = -1;
        }
    }
    printf("%d\n", f(0, n));
    return 0;
}

#include <stdio.h>

int n;
char str[501];
int dp[501][501] = {0};

int min(int x,int y){return x<y?x:y;}

int solve(int start,int end)
{
	if(start == end)
		return dp[start][end] = 1;

	 if(str[end-1] == str[end] || str[start] == str[end])
	 {
	 	if(!dp[start][end-1])
	 		dp[start][end-1]=solve(start,end-1);
	 	dp[start][end] = dp[start][end-1];
	 	return dp[start][end];
	 }

	 if(!dp[start][end-1])
	 	dp[start][end-1] = solve(start,end-1);

	 dp[start][end] = dp[start][end-1] + 1;

	 for(int i=start+1;i<=end;i++)
	 	if(str[i] == str[end])
	 	{
	 		if(!dp[i][end])
	 			dp[i][end] = solve(i,end);

	 		int temp = dp[i][end];
	 		if(!dp[start][i-1])
	 			dp[start][i-1] = solve(start,i-1);
	 		temp += dp[start][i-1];
	 		dp[start][end] = min(temp,dp[start][end]);
	 	}

 	return dp[start][end];
}

int main()
{
	//freopen ("input.txt","r",stdin);
	scanf("%d",&n);
	getchar();
	for(int i=0;i<n;i++)
		str[i] = getchar();
	str[n] = '\0';
	//fclose(stdin);
	printf("%d\n",solve(0,n-1));
}

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int64_t i64;
typedef int32_t i32;

static void print_int(i64 n){if(n<0){putchar('-');n=-n;}if(n==0){putchar('0');return;}int s[20],len=0;while(n>0){s[len++]=n%10+'0';n/=10;}while(len>0){putchar(s[--len]);}}
static i64 read_int(void){int prev='\0';int c=getchar();while(!('0'<=c && c<='9')){prev=c;c=getchar();}i64 res=0;while('0'<=c && c<='9'){res=10*res+c-'0';c=getchar();}return prev=='-'?-res:res;}

#define MIN(a,b) ((a)<(b)?(a):(b))
#define ALLOC(size,type) ((type*)calloc((size),sizeof(type)))

#define POS(i, j) ((i) * (n + 1) + (j))

void run (void) {
  i32 n = read_int();
  char *s = ALLOC (n + 1, char);
  scanf ("%s", s);
  i32 *dp = ALLOC ((n + 1) * (n + 1), i32);
  for (i32 len = 1; len <= n; ++len) {
    for (i32 l = 0; l <= n - len; ++l) {
      i32 r = l + len;
      i32 min = 1 + dp[POS(l + 1, r)];
      for (i32 i = l + 1; i < r; ++i) {
        if (s[i] != s[l]) continue;
        min = MIN (min, dp[POS(l + 1, i)] + dp[POS(i, r)]);
      }
      dp[POS(l, r)] = min;
    }
  }
  print_int (dp[POS(0, n)]);
  puts ("");
}

int main (void) {
  run ();
  return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int64_t i64;
typedef int32_t i32;

static void print_int(i64 n){if(n<0){putchar('-');n=-n;}if(n==0){putchar('0');return;}int s[20],len=0;while(n>0){s[len++]=n%10+'0';n/=10;}while(len>0){putchar(s[--len]);}}
static i64 read_int(void){int prev='\0';int c=getchar();while(!('0'<=c && c<='9')){prev=c;c=getchar();}i64 res=0;while('0'<=c && c<='9'){res=10*res+c-'0';c=getchar();}return prev=='-'?-res:res;}

#define MIN(a,b) ((a)<(b)?(a):(b))

#define POS(i, j) ((i) * (n + 1) + (j))

void run (void) {
  i32 n = read_int();
  char *s = (char *) calloc (n + 1, sizeof (char));
  scanf ("%s", s);
  i32 len = 1;
  for (i32 i = 1; i < n; ++i) {
    if (s[i] == s[len - 1]) continue;
    s[len++] = s[i];
  }
  s[len] = '\0';
  n = len;
  i32 *dp = (i32 *) calloc ((n + 1) * (n + 1), sizeof (i32));
  for (i32 len = 1; len <= n; ++len) {
    for (i32 l = 0; l < n + 1 - len; ++l) {
      i32 r = l + len;
      i32 min = 1 + dp[POS(l + 1, r)];
      for (i32 j = l + 1; j < r; ++j) {
        if (s[j] != s[l]) continue;
        min = MIN(min, dp[POS(l + 1, j)] + dp[POS(j, r)]);
      }
      dp[POS(l, r)] = min;
    }
  }
  print_int (dp[POS(0, n)]);
  puts("");
}

int main (void) {
  run ();
  return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int64_t i64;
typedef int32_t i32;

static void print_int(i64 n){if(n<0){putchar('-');n=-n;}if(n==0){putchar('0');return;}int s[20],len=0;while(n>0){s[len++]=n%10+'0';n/=10;}while(len>0){putchar(s[--len]);}}
static i64 read_int(void){int prev='\0';int c=getchar();while(!('0'<=c && c<='9')){prev=c;c=getchar();}i64 res=0;while('0'<=c && c<='9'){res=10*res+c-'0';c=getchar();}return prev=='-'?-res:res;}

#define POS(i, j) ((i) * (n + 1) + (j))

void run (void) {
  i32 n = read_int();
  char *s = (char *) calloc (n + 1, sizeof (char));
  scanf ("%s", s);
  i32 *dp = (i32 *) calloc ((n + 1) * (n + 1), sizeof (i32));
  for (i32 len = 1; len <= n; ++len) {
    for (i32 l = 0; l + len <= n; ++l) {
      i32 r = l + len;
      i32 min = 1 + dp[POS(l + 1, r)];
      for (i32 i = l + 1; i < r; ++i) {
        if (s[l] != s[i]) continue;
        i32 d = dp[POS(l + 1, i)] + dp[POS(i, r)];
        min = min > d ? d : min;
      }
      dp[POS(l, r)] = min;
    }
  }
  print_int (dp[POS(0, n)]);
  puts ("");
}

int main (void) {
  run ();
  return 0;
}


#include <stdio.h>

int main() {
	static int kk[10];
	long long sum;
	int n, d, a, b;

	scanf("%d", &n);
	for (d = 1; d <= 9; d++)
	 kk[d] = n / 9 + (n % 9 >= d);
	sum = 0;
	for (a = 1; a <= 9; a++)
		for (b = 1; b <= 9; b++)
			sum += (long long) kk[a] * kk[b] * kk[(a * b + 8) % 9 + 1];
	for (a = 1; a <= n; a++)
		sum -= n / a;
	printf("%lld\n", sum);
	return 0;
}

#include<stdio.h>

long long n, a[9], result=0, i, j;

int main(){
    scanf("%I64d", &n);
    for(i=1; i<=n; i++){
        a[i%9]++;
        result-=n/i;
    }
    for(i=0; i<9; i++)
        for(j=0; j<9; j++)
            result+=a[i]*a[j]*a[i*j%9];

    printf("%I64d\n", result);

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int GetD (int n)
{
    int now = n;
    while (now > 9)
    {
        int temp = 0;
        while (now > 0)
        {
            temp += (now % 10);
            now /= 10;
        }
        now = temp;
    }
    return now;
}

int main ()
{
    int N;
    scanf("%d",&N);
    static int cnt[10];
    memset(cnt,0,sizeof(cnt));
    int i;
    for (i = 1; i <= N; i++)
    {
        cnt[GetD(i)]++;
    }
    long long int res = 0;
    int j, k;
    for (j = 0; j <= 9; j++)
    {
        for (k = 0; k <= 9; k++)
        {
            i = GetD(j*k);
            res += ((long long int)(cnt[i]) * (long long int)(cnt[j]) * (long long int)(cnt[k]));
        }
    }

    /*
    for (i = 1; i <= N; i++)
    {
        for (j = 1; (j*j) <= i; j++)
        {
            if ((i % j) == 0)
            {
                res--;
                if ((j*j) < i)
                {
                    res--;
                }
            }
        }
    }
    */

    for (i = 1; i <= N; i++)
    {
        res -= (long long int)(N / i);
    }

    printf("%I64i\n",res);
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int main(){
  int i,j,k,l,m,n;
  long long d[10];
  long long res=0;

  scanf("%d",&n);
  rep(i,10) d[i]=0;

  REP(i,1,n+1) d[i%9]++;
  rep(i,10) rep(j,10) res += d[i]*d[j]*d[(i*j)%9];
  REP(i,1,n+1) res -= n/i;
  printf("%I64d\n",res);

  return 0;
}

#include <stdio.h>
#include <string.h>
#define LL long long
int d(int x)
{
    if(x%9==0)
        return 9;
    else
        return x%9;
}
int main()
{
    int i,j,k;
    LL s=0;
    int n,a[10]={0};
    scanf("%d",&n);
    for(i=1;i<=n;i++)
        a[d(i)]++;
    for(i=1;i<=9;i++)
        for(j=1;j<=9;j++)
            for(k=1;k<=9;k++)
                if(d(i*j)==k)
                    s+=(LL)a[i]*a[j]*a[k];
    for(i=1;i<=n;i++)
        for(j=1;i*j<=n;j++)
            if(d(d(i)*d(j))==d(i*j))
                s--;
    printf("%I64d\n",s);
    return 0;
}

#include <stdio.h>

unsigned long long f[9],g[9];

// digital root je zapravo modul od 9.
// ako je mod 9 == 0, digtalni root je 9.

int main() {
	unsigned long long a,b,n;
	scanf("%lld\n",&n);
	for (a=1;a<=n;a++) f[a%9]++;
	unsigned long long cnt=0;
	for (a=0;a<9;a++)
		for (b=0;b<9;b++)
			cnt+=f[a]*f[b]*f[a*b%9];
	for (a=1;a*a<=n;a++)
		cnt-=(n-a*a)/a*2+1;
	printf("%lld\n",cnt);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int sod(int n){
  int res=0;
  while(n) res+=n%10, n/=10;
  return res;
}

int main(){
  int i,j,k,l,m,n;
  long long d[10];
  long long res=0;

  scanf("%d",&n);
  rep(i,10) d[i]=0;

  REP(i,1,n+1) d[sod(i)%9]++;
  rep(i,10) rep(j,10) res += d[i]*d[j]*d[(i*j)%9];
  REP(i,1,n+1) res -= n/i;
  printf("%I64d\n",res);

  return 0;
}

#include<stdio.h>
#define N 1123
#define M 170
#define K 1000
#define L 200

long long a[10];
long long aa[10];
long long b[10];
int c[M];
int cc[M];
char d[N];
int next[N];
int pre[N];
long long output;
long long temp;
int record[N][M];
int store;

void prime( int n )
{
  int i, o, p, j, l, k;
  for (i = 0;i<=n+10;++i)
  {
    d[i] = 1;
    next[i] = i+1;
    pre[i] = i-1;
  }
  d[0] = 0; d[1] = 0;
  for (i=2;i<=n;i=next[i])
  {
    for (j=next[i];j<=n;j=next[j])
      if (j%i == 0)
      {
        p = pre[j];
        next[p] = next[j];
        pre[next[j]] = p;
        d[j] = 0;
      }
  }
  c[0] = 0;
  for (i=0;i<=n;++i)
    if (d[i] == 1)
    {
      c[++c[0]] = i;
    }
}

void shu_chu( long long k )
{
  int a[100];
  int i, j;
  i = 0;
  if (k==0)
  {
    printf("0\n" );
    return;
  }
  while(k!=0)
  {
    a[i++] = k%10;
    k = k/10;
  }
  while( i>0 ) printf( "%d", a[--i] );
  printf( "\n" );
}

main()
{
  int i, o, p, j, k, l, n, m, q;

  int boring[100];

  scanf( "%d", &n );

  if (n==1) {printf( "0\n" ); return 0;}

  boring[0] = 0;
  for (i=1;i<100;++i)
  {
    boring[i]=boring[i-1]+1;
    if (boring[i] ==10) boring[i] = 1;
  }

  prime( K );

  for (i=0;i<10;++i) {a[i] = 0; b[i] = 0;}
  a[1] = 1; b[1] = 1;
  for (i=0;i<10;++i)
    for (j=0;j<M;++j) record[i][j] = 0;

  store = 1;
  for (i=2;i<=n;++i)
  {
    ++store;
    if (store==10) store = 1;

    p = i;
    temp = (long long)1;
    cc[0] = 0;

    for (j=1;j<=c[0];++j)
    {
      cc[j] = 0;
      if (p>K || p==i)
        while( p%c[j] == 0 )
        {
          ++cc[j];
          p /= c[j];
        }
    }

    if (p>K) temp*=2;

    for (j=1;j<=c[0];++j)
    {
      if (p<=K) cc[j] += record[p][j];
      temp *= (long long)(cc[j]+1);
      if (i<=K) record[i][j] = cc[j];
    }

    temp -= 2;
//printf(" temp = %d %lld\n", i, temp );
    for (j=0;j<=9;++j) aa[j] = (long long)0;
    for (j=0;j<=9;++j)
    {
      p = boring[store*j];
      aa[p] += a[j];
    }
    //++a[dd(j)];
    for (j=0;j<=9;++j) output+=(long long)2*a[j]*aa[j]; //2 usual

    output += aa[store] * (long long)2; //2 special

    output -= (long long)2;

    ++a[store];

    p = boring[store*store];
    output += a[p]; //3

    output += b[store] - temp;  //1
    for (j=0;j<=9;++j) b[j] += aa[j] * 2;

    b[p] += (long long)1;

  }

//  printf( "%lld\n", output );
  shu_chu( output );
  return 0;
}

#include <stdio.h>

int digit(int n)
{
     int sum = 0;

     while (n) {
	  sum += n % 10;
	  n /= 10;
     }

     if (sum < 10) {
	  return sum;
     } else {
	  return digit(sum);
     }
}

int main()
{
     int n, sum = 0, i, j;

     scanf("%d", &n);

     for (i = 1; i <= n && i < 10; i++) {
	  for (j = 1; j <= n && j < 10; j++) {
	       if (i * j >= 10 && digit(i * j) <= n) sum++;
	  }
     }

     printf("%d\n", sum);

     return 0;
}

#include <stdio.h>

int main() {
	static int kk[10];
	long long sum;
	int n, d, a, b;

	scanf("%d", &n);
	for (d = 1; d <= 9; d++)
	 kk[d] = n / 9 + ((n + 8) % 9 + 1 >= d);
	sum = 0;
	for (a = 1; a <= 9; a++)
		for (b = 1; b <= 9; b++)
			sum += (long long) kk[a] * kk[b] * kk[(a * b + 8) % 9 + 1];
	for (a = 1; a <= n; a++)
		sum -= n / a;
	printf("%lld\n", sum);
	return 0;
}

#include <stdio.h>

int f[9],g[9];

// digital root je zapravo modul od 9.
// ako je mod 9 == 0, digtalni root je 9.

int main() {
	long long a,b,n;
	scanf("%lld\n",&n);
	for (a=1;a<=n;a++) f[a%9]++;
	long long cnt=0;
	for (a=0;a<9;a++)
		for (b=0;b<9;b++)
			cnt+=f[a]*f[b]*f[a*b%9];
	for (a=1;a*a<=n;a++)
		cnt-=(n-a*a)/a*2+1;
	printf("%lld\n",cnt);
	return 0;
}

#include <stdio.h>

#define N 5

int f[9],g[9];

// digital root je zapravo modul od 9.
// ako je mod 9 == 0, digtalni root je 9.

int main() {
	long long a,b,c,d;
	for (a=1;a<=N;a++) f[a%9]++;
	long long cnt=0;
	for (a=0;a<9;a++)
		for (b=0;b<9;b++)
			cnt+=f[a]*f[b]*f[a*b%9];
	for (a=1;a*a<=N;a++)
		cnt-=(N-a*a)/a*2+1;
	printf("%lld\n",cnt);
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int sod(int n){
  int res=0;
  while(n) res+=n%10, n/=10;
  return res;
}

int main(){
  int i,j,k,l,m,n;
  long long d[10];
  long long res=0;

  scanf("%d",&n);
  rep(i,10) d[i]=0;

  REP(i,1,n+1) d[sod(i)]++;
  rep(i,10) rep(j,10) res += d[i]*d[j]*d[(i*j)%9];
  REP(i,1,n+1) res -= n/i;
  printf("%I64lld\n",res);

  return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int sod(int n){
  int res=0;
  while(n) res+=n%10, n/=10;
  return res;
}

int main(){
  int i,j,k,l,m,n;
  long long d[10];
  long long res=0;

  scanf("%d",&n);
  rep(i,10) d[i]=0;

  REP(i,1,n+1) d[sod(i)]++;
  rep(i,10) rep(j,10) res += d[i]*d[j]*d[(i*j)%9];
  REP(i,1,n+1) res -= n/i;
  printf("%lld\n",res);

  return 0;
}

#include<stdio.h>
#define N 1123456
#define M 112233

long long a[10];
long long aa[10];
long long b[10];
int c[M];
int cc[M];
char d[N];
long long output;
long long temp;

void prime( int n )
{
  int i, o, p, j, k, l;
  for (i = 0;i<=n;++i) d[i] = 1;
  d[0] = 0; d[1] = 0;
  for (i=2;i<=n;++i)
  {
    if (d[i]==1)
    {
      for (j=i+1;j<=n;++j)
        if (j%i == 0) d[j] = 0;
    }
  }
  c[0] = 0;
  for (i=0;i<=n;++i)
    if (d[i] == 1)
    {
      c[++c[0]] = i;
//printf( "p = %d\n", i );
    }
}

int dd(int x )
{
  int p;
  while( x>=10 )
  {
    p = 0;
    while (x>0)
    {
      p += x%10;
      x = x/10;
    }
    x = p;
  }
  return( x );
}

int ddd(long long x )
{
  long long p;
  while( x>=(long long)10 )
  {
    p = 0;
    while (x>0)
    {
      p += x%10;
      x = x/10;
    }
    x = p;
  }
  return( (int)x );
}

main()
{
  int i, o, p, j, k, l, n, m, q;
  scanf( "%d", &n );
  if (n==1) {printf( "0\n" ); return 0;}
  prime( n );
  for (i=0;i<10;++i) {a[i] = 0; b[i] = 0;}
  a[1] = 1; b[1] = 1;

  for (i=2;i<=n;++i)
  {
    p = i;
    temp = (long long)1;
    for (j=1;j<=c[0];++j)
    {
      q = 0;
      while( p%c[j] == 0 )
      {
        ++q;
        p /= c[j];
//printf("%d %d\n", p, j );
      }
      ++q;
//if (c[j]==i) cc[j] = 0;
      temp *= (long long)q;
    }
temp -= 2;
//printf(" temp = %d %lld\n", i, temp );
    for (j=0;j<=9;++j) aa[j] = (long long)0;
    for (j=0;j<=9;++j)
    {
      aa[dd(j*i)] += a[j];
    }
    //++a[dd(j)];
    for (j=0;j<=9;++j) output+=(long long)2*a[j]*aa[j]; //2 usual

    output += aa[dd(i)] * (long long)2; //2 special

    output -= (long long)2;

    ++a[dd(i)];

    output += a[ddd((long long)i*(long long)i)]; //3

    output += b[dd(i)] - temp;  //1
    for (j=0;j<=9;++j) b[j] += aa[j] * 2;
    b[ddd((long long)i*(long long)i)] += (long long)1;
  }

  printf( "%lld\n", output );
  return 0;
}

#include<stdio.h>

long long n, a[9], result=0, i, j;

int main(){
    scanf("%l64d", &n);
    for(i=1; i<=n; i++){
        a[i%9]++;
        result-=n/i;
    }
    for(i=0; i<9; i++)
        for(j=0; j<9; j++)
            result+=a[i]*a[j]*a[i*j%9];

    printf("%l64d\n", result);

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int GetD (int n)
{
    int now = n;
    while (now > 9)
    {
        int temp = 0;
        while (now > 0)
        {
            temp += (now % 10);
            now /= 10;
        }
        now = temp;
    }
    return now;
}

int main ()
{
    int N;
    scanf("%d",&N);
    static int cnt[10];
    memset(cnt,0,sizeof(cnt));
    int i;
    for (i = 1; i <= N; i++)
    {
        cnt[GetD(i)]++;
    }
    long long int res = 0;
    int j, k;
    for (j = 0; j <= 9; j++)
    {
        for (k = 0; k <= 9; k++)
        {
            i = GetD(j*k);
            res += (long long int)(cnt[i] * cnt[j] * cnt[k]);
        }
    }
    for (i = 1; i <= N; i++)
    {
        for (j = 1; (j*j) <= i; j++)
        {
            if ((i % j) == 0)
            {
                res--;
                //printf("%d = %d * %d\n",i,j,i/j);
                if ((j*j) < i)
                {
                    res--;
                    //printf("%d = %d * %d\n",i,i/j,j);
                }
            }
        }
    }
    printf("%I64i\n",res);
    return 0;
}


#include <stdio.h>
#define lli long long int
double sqrt(double i){
	double a = 2.0;
	int k = 100;
	while(k-->0){
		a = (a+i/a)/2.0;
	}
	return a;
}
int main(void){
	lli a,b;
	scanf("%lld %lld",&a,&b);
	if(a == b){
		printf("0\n");
		return 0;
	}
	if(a > b){
		int ch = a;
		a = b;
		b = ch;
	}
	lli q = b - a;
	lli j = a/q;
	if(q*j < a)
		j++;
	q *=j;
	int za = 0;
	int rq = sqrt(q);
	int me = 1;
	int meb = q;
	while((++za) <rq+1){
		if(q%(za) == 0){
			me = za;
			if(za >= a)
				break;
			if((q/za)>=a)
				meb = q/za;
			else
				break;
		}
	}
	if(me < a)
		za = meb;
	else
		za = me;
	lli k = za - a;
	printf("%lld\n",k);
	return 0;
}

#include <stdlib.h>
#include <stdio.h>

typedef long long int lli;

#define TRUE         (1==1)
#define FALSE        (!TRUE)

#define fo3(a,b,c)   for(a=(int)(b);a<=(int)(c);a++)
#define of3(a,b,c)   for(a=(int)(b);a>=(int)(c);a--)
#define in32(a)      scanf("%d",&(a))
#define in64(a)      scanf("%I64d",&(a))
#define out32(a)     printf("%d\n",(a))
#define out64(a)     printf("%I64d\n",(a))
#define instr(a)     scanf("%s",(a))
#define outstr(a)    printf("%s\n",(a))
#define max(a,b)     (((a)<(b))?(b):(a))
#define min(a,b)     (((a)>(b))?(b):(a))

lli gcd(lli a, lli b) {
    return (b == 0) ? a : gcd(b, a % b);
}
lli lcm(lli a, lli b) {
    lli g = gcd(a, b);
    return a * (b / g);
}

int facts(lli val, lli * arr, int st) {
    if (val == 1) {
        arr[0] = 1;
        return 1;
    }
    int i = st,k;
    while (i * i <= val) {
        if (val % i == 0) {
            int pow = 0;
            while (val % i == 0) {
                pow ++;
                val/=i;
            }
            int cur = facts(val,arr,i+1);
            int res = cur * (pow + 1);
            fo3(k,cur,res-1)
                arr[k] = arr[k-cur]*i;
            return res;
        }
        i++;
    }
    arr[0] = 1;
    arr[1] = val;
    return 2;
}

int main(void)
{
    lli x, y;
    int i;
    in64(x);
    in64(y);
    if (x < y) {
        x^=y;
        y^=x;
        x^=y;
    }
    lli diff = x - y;
    if (x == y) {
        out64(0);
        return EXIT_SUCCESS;
    }
    lli ans = 0;
    lli best = lcm(x, y);

    lli arr[2000];
    int num = facts(diff, arr, 2);
    fo3(i,0,num-1) {
        lli m = x % arr[i];
        if (m==0)
            m = diff;
        lli add = diff - m;
        add %= arr[i];
        lli tmp = lcm(x+add, y+add);
        if (tmp < best || (tmp == best && add < ans)){
            best = tmp;
            ans = add;
        }
    }
    out64(ans);
    return EXIT_SUCCESS;
}

#include<stdio.h>
#include<string.h>
#define MAX 100000
/*int temp[MAX];
void mergesort(int a[],int b[],int indices[],int first,int last)
{
    if(first==last) return;
    int middle=(first+last)/2;
    mergesort(a,b,indices,first,middle);
    mergesort(a,b,indices,middle+1,last);
    int i,j,k;
    for(i=first,j=first,k=middle+1;i<=last;i++)
    {
        if(j==middle+1) temp[i]=indices[k++];
        else if(k==last+1) temp[i]=indices[j++];
        else if(a[indices[k]]-b[indices[k]]>a[indices[j]]-b[indices[j]]) temp[i]=indices[k++];
        else temp[i]=indices[j++];
    }
    for(i=first;i<=last;i++)
    {
        indices[i]=temp[i];
    }
}*/
long long int gcd(long long int a,long long int b)
{
    if(b==0) return a;
    else return gcd(b,a%b);
}
int main()
{
    long long int a,b;
    scanf("%I64d %I64d",&a,&b);
    if(a>b)
    {
        int c=a;
        a=b;
        b=c;
    }
    long long p=a;
    long long int k=0,k1=0,compliment=b-a,compliment1=b-a;
    p=p*b;
    long long int GCD=gcd(a,b);
    p=p/GCD;
    long long int p2=p;
    for(k=1;k*k<=b-a;k++)
    {
        if((k-a%k!=k-b%k)||((b-a)%k)) continue;
        compliment=(b-a)/k;
        long long int G=gcd(a+(k-a%k)%k,b+(k-b%k)%k);
        long long int s=a+(k-a%k)%k;
        s=s*(b+(k-b%k)%k);
        s=s/G;
        if(s<p)
        {
            p=s;
            k1=(k-a%k)%k;
        }
        if(a%compliment!=b%compliment) continue;
        G=gcd(a+(compliment-a%compliment)%compliment,b+(compliment-b%compliment)%compliment);
        s=a+(compliment-a%compliment)%compliment;
        s=s*(b+(compliment-b%compliment)%compliment)/G;
        if(s<=p2)
        {
            p2=s;
            compliment1=(compliment-b%compliment)%compliment;
        }
    }
    if(p2<p)
    {
        k1=compliment1;
    }
    printf("%I64d",k1);
    return 0;
}

#include <stdio.h>

int main() {
	int a, b, c, x;
	long long k, k_, min, ab;

	scanf("%d%d", &a, &b);
	if (a == b) {
		printf("0\n");
		return 0;
	}
	if (a > b)
		c = a, a = b, b = c;
	min = (long long) a * b, k_ = 0;
	for (c = 1; c * c <= b - a; c++)
		if ((b - a) % c == 0) {
			x = c;
			k = (x - a % x) % x;
			ab = (a + k) * (b + k) / x;
			if (min > ab || (min == ab && k_ > k))
				min = ab, k_ = k;
			x = (b - a) / c;
			k = (x - a % x) % x;
			ab = (a + k) * (b + k) / x;
			if (min > ab || (min == ab && k_ > k))
				min = ab, k_ = k;
		}
	printf("%lld\n", k_);
	return 0;
}

#include <stdio.h>
#include <inttypes.h>
#include <stdint.h>

typedef int64_t I64;

I64 greatestCommonDivisor(I64 a, I64 b);

int main () {

    I64 a, b;
    scanf("%"SCNi64, &a);
    scanf("%"SCNi64, &b);

    if (a == b) {
        printf("0\n");
        return 0;
    }

    if (a > b) {
        I64 t = b;
        b = a;
        a = t;
    }

    I64 kMin = 0, diff = b - a;
    I64 min = (a / greatestCommonDivisor(a, b) * b);

    for (I64 i = 1; i * i <= diff; ++i) {
        if (diff % i != 0) {
            continue;
        }

        I64 n = i;
        if (a % n != 0) {
            I64 k = n - a % n;
            I64 m = ((a + k) / greatestCommonDivisor(a + k, b + k) * (b + k));
            if ((m == min && k < kMin) || m < min) {
                min = m;
                kMin = k;
            }
        }

        n = diff / i;
        if (a % n != 0) {
            I64 k = n - a % n;
            I64 m = ((a + k) / greatestCommonDivisor(a + k, b + k) * (b + k));
            if ((m == min && k < kMin) || m < min) {
                min = m;
                kMin = k;
            }
        }
    }

    printf("%"PRIi64"\n", kMin);
    return 0;
}

I64 greatestCommonDivisor(I64 a, I64 b) {
    I64 res = a % b;
    while (res > 0) {
        a = b;
        b = res;
        res = a % b;
    }
    return b;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>
//#include <DEBUG.h>
#ifndef LL
#define LL long long
#endif
#ifndef uLL
#define uLL unsigned long long
#endif
#ifndef uL
#define uL unsigned int
#endif
#ifndef iL
#define iL int
#endif
#ifndef iS
#define iS short
#endif
#ifndef uS
#define uS unsigned short
#endif
#ifndef uC
#define uC unsigned char
#endif
#define max(a,b) (((a)>(b))?(a):(b))
#define min(a,b) (((a)<(b))?(a):(b))
#define abs(a) (((a)<0)?(-(a)):(a))
#define sgn(a) (((a)<0)?(1):(0))
#define movs(a,b,l) (memmove((a),(b),sizeof(*(b))*(l)))
#define stosb(a,b,l) (memset((a),(b),sizeof(*(a))*(l)))
static inline uL bsr(uL a)
{
    __asm__("bsrl %0,%0":"+r"((uL)a));
    return a;
}
static inline uLL sqrt64(uLL x)
{
    uLL t,g;
    for (g=(x>>1)+(x&1),t=x;g<t;g=(g+x/g)>>1)
    {
        t=g;
    }
    return t;
}
static inline uLL gcd(uLL a,uLL b)
{
    while (a>0)
    {
        b=(b%a)^a;
        a=a^b;
        b=a^b;
    }
    return b;
}
uLL prime[4000001];
uLL EulerSieve(uLL n)
{
    uLL i,j;
    memset(prime,0,sizeof(*prime)*(n+1));
    *prime=0;
    for (i=2;i<=n;i++)
    {
        if (prime[i]==0)
        {
            prime[++(*prime)]=i;
            prime[i]=i;
        }
        for (j=1;j<=*prime;j++)
        {
            if (i*prime[j]>n) {break;}
            prime[i*prime[j]]=prime[j];
            if (prime[i]==prime[j]) {break;}
        }
    }
    return *prime;
}
uLL fac[10000];
uLL times[10000];
uLL factoring(uLL a,uLL *fac,uLL *times)
{
	uLL k,i,l;
	l=sqrt64(a);
	for (k=0,i=1;(i<=prime[0])&&(prime[i]<=l);i++)
	{
		if (a%prime[i]==0)
		{
			fac[++k]=prime[i];
			times[k]=1;
			for (a=a/prime[i];a%prime[i]==0;a=a/prime[i],times[k]+=1);
		}
	}
	if (a>1)
	{
		fac[++k]=a;
		times[k]=1;
	}
	return k;
}
LL aa,bb,kk,ans1,ans2;
LL dfs(LL x,LL id)
{
	LL i,j,y;
	if (id>*fac)
	{
		kk=x-aa%x;
		if (x-bb%x==kk)
		{
			//printf("%lld %lld\n",x,kk);
			if ((aa+kk)/x*(bb+kk)<ans1)
			{
				ans1=(aa+kk)/x*(bb+kk);
				ans2=kk;
			}
		}
	}
	else
	{
		y=fac[id];
		for (i=0,j=1;i<=times[id];i++,j=j*fac[id])
		{
			dfs(x*j,id+1);
		}
	}
}
LL ans[100000];
int main()
{
	//freopen("in.in","r",stdin);
	LL i,j,k,a,b,c,n,m,x,y;
	EulerSieve(100000);
	scanf("%lld%lld",&a,&b);
	if (a>b) {c=a;a=b;b=c;}
	if (b%a==0)
	{
		printf("0\n");
	}
	else
	{
		ans1=a/gcd(a,b)*b;ans2=0;
		*fac=factoring(b-a,fac,times);
		aa=a;bb=b;
		dfs(1,1);
		printf("%lld\n",ans2);
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int64_t i64;
typedef int32_t i32;

static void print_int(i64 n){if(n<0){putchar('-');n=-n;}if(n==0){putchar('0');return;}int s[20],len=0;while(n>0){s[len++]=n%10+'0';n/=10;}while(len>0){putchar(s[--len]);}}
static i64 read_int(void){int prev='\0';int c=getchar();while(!('0'<=c && c<='9')){prev=c;c=getchar();}i64 res=0;while('0'<=c && c<='9'){res=10*res+c-'0';c=getchar();}return prev=='-'?-res:res;}

i64 gcd (i64 a, i64 b) {
  i64 r = a % b;
  while (r > 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}

void run (void) {
  i32 a = read_int();
  i32 b = read_int();
  if (a == b) {
    puts ("0");
    return;
  }
  if (a > b) {
    i32 s = b;
    b = a;
    a = s;
  }
  i64 min = (i64)a / gcd (a, b) * b;
  i32 min_k = 0;
  i32 d = b - a;
  for (i32 i = 1; i * i <= d; ++i) {
    if (d % i != 0) continue;
    i32 f = i;
    if (a % f != 0) {
      i32 k = f - a % f;
      i64 v = (i64) (a + k) / gcd (a + k, b + k) * (b + k);
      if (v < min || (v == min && k < min_k)) {
	min = v;
	min_k = k;
      }
    }
    f = d / i;
    if (a % f != 0) {
      i32 k = f - a % f;
      i64 v = (i64) (a + k) / gcd (a + k, b + k) * (b + k);
      if (v < min || (v == min && k < min_k)) {
	min = v;
	min_k = k;
      }
    }
  }
  print_int (min_k);
  puts ("");
}

int main (void) {
  run ();
  return 0;
}

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,temp,c,d,flag=0,len,i;
    scanf("%d %d",&a,&b);
    if(a>b)
    {
        temp=a;
        a=b;
        b=temp;
    }
    if(a==b)
    {printf("0\n");return 0;}
    c=b-a;
    d=a%c;
    if(d==0)
    {printf("0\n");return 0;}
    if(a<c)
    {

        for(i=a;i<=c/2;i++)
        {
            if(c%i==0)
            {flag=1;break;}
        }
        if(flag)
        printf("%d\n",i-a);
        else
            printf("%d\n",c-a);
            return 0;
    }
    else
    {
        printf("%d\n",c-d);
        return 0;;
    }
}

/*			                       ____COMPETITIVE CODING____                                                          */

//--Header Files--

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <time.h>

//--Macros--

#define N 200001
#define R 100000007
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

//--Structures--

//--Comparator Functions--

int comp(const void *a, const void *b)
{
	return (*(int *)a - *(int *)b);
}
int comp_desc(const void *a, const void *b)
{
	return (*(int *)b - *(int *)a);
}

//--Function Declarations--

// void qsort(array name, size of array, size of each element, comp);
// int* bsearch(address of search element, array name, size of array, size of each element, comp);
int rmdup(int [], int); // int rmDup(array, size of array);
int gcd(int, int); // int gcd(first number, second number);

//--Useful Variables--

int i = 0, j = 0, k = 0, flag = 1, count = 0, temp, pos = 0, test_case, mx = 0, mn = INT_MAX;
long long sum = 0, product = 1;

int main()
{
	//clock_t tStart = clock();
	int a, b, diff;
	scanf("%d %d", &a, &b);
	diff = abs(a - b);
	mn = MIN(a, b);
	mx = MAX(a, b);
	if(mn == mx)
	{
		printf("0\n");
		return 0;
	}
	if(mn % diff == 0)
	{
		printf("0\n");
		return 0;
	}
	if(mn < diff)
	{
		for(i = mn; i <= diff / 2; i++)
		{
			if(diff % i == 0)
			{
				flag = 0;
				break;
			}
		}
		if(!flag)
		{
			printf("%d\n", i - mn);
			return 0;
		}
		else
		{
			printf("%d\n", diff - mn);
			return 0;
		}
	}
	else
	{
		printf("%d\n", diff - mn % diff);
		return 0;
	}

	//printf("%lf seconds.\n", (clock() - tStart)/CLOCKS_PER_SEC);
	return 0;
}

int rmdup(int a[], int n)
{
	if(n == 0 || n == 1)
		return n;
	int j = 0;
	for(i = 0; i < n - 1; i++)
	{
		if(a[i] != a[i+1])
		{
			a[j++] = a[i];
		}
	}
	a[j++] = a[n-1];
	return j;
}

int gcd(int x, int y)
{
	if(y == 0)
	{
		return x;
	}
	else
	{
		return gcd(y, x % y);
	}
}

#include <stdio.h>
#include <math.h>
typedef long long LL;

LL gcd(LL x, LL y)
{
	LL t;
	while(y){
		t = x;
		x = y;
		y = t % y;
	}
	return x;
}

int main()
{
	int a, b, d, k, i, c = 0;
	int dv[30000];
	LL x, y, t, min = 0, ans, z, ta;

	scanf("%d%d", &a, &b);
	if(a > b) a ^= b, b ^= a, a ^= b;
	d = b - a;
	if(!d){
		puts("0");
		return 0;
	}
	k = sqrt(d);
	for(i = 1; i <= k; i++){
		if(d % i == 0) dv[c++] = i;
	}
	i = c - 1;
	if(d == dv[i] * dv[i]) i--;
	for( ; i >= 0; i--){
		dv[c++] = d / dv[i];
	}
	for(i = 0; i < c; i++){
		t = (LL)dv[i];
		x = (LL)a / t * t;
		if(x < a) x += t;
		y = x + d;
		while(gcd(x / t, y / t) != 1) x += t, y += t;
		if(!min) ans = x - a, min = x / t * y ;
		else{
			z = x / t * y , ta = x - a;
			if(z < min) min = z, ans = ta;
			else if(z == min){
				if(ta < ans) ans = ta;
			}
		}
	}
	printf("%lld\n", ans);

	return 0;
}

#include<stdio.h>
int gcd(int a,int b){
	int t;
	while(b>0){
		t=a%b;
		a=b;
		b=t;
	}
	return a;
}
int main()
{
	long long a,b;
	scanf("%I64d %I64d",&a,&b);
	long long t;
	if(a>b){
		t=a;
		a=b;
		b=t;
	}
	t=b-a;
	long long k=0;
	long long k1;
	long long min=a/gcd(a,b)*b;
	for(long long i=1;i*i<=t;i++){
		k1=i-b%i;
		if((a+k1)*(b+k1)<min*gcd(a+k1,b+k1)){
			min=(a+k1)/gcd(a+k1,b+k1)*(b+k1);
			k=k1;
		}
		k1=(t/i)-b%(t/i);
		if((a+k1)/gcd(a+k1,b+k1)*(b+k1)<min){
			min=(a+k1)/gcd(a+k1,b+k1)*(b+k1);
			k=k1;
		}
	}
	printf("%I64d\n",k);
	return 0;
}

#include <stdio.h>
#define lli long long int
int main(void){
        lli a,b;
        scanf("%lld %lld",&a,&b);
        if(a > b){
                int ch = a;
                a = b;
                b = ch;
        }
        lli q = b - a;
        lli j = 0;
        while(q*(++j) < a);
        lli k = q*j - a;
        printf("%lld\n",k);
        return 0;
}

#include <stdio.h>
#define lli long long int
double sqrt(double i){
        double a = 2.0;
        int k = 50;
        while(k-->0){
                a = (a+i/a)/2.0;
        }
        return a;
}
int main(void){
        lli a,b;
        scanf("%lld %lld",&a,&b);
        if(a == b){
                printf("0\n");
                return 0;
        }
        if(a > b){
                int ch = a;
                a = b;
                b = ch;
        }
        lli q = b - a;
        lli j = a/q;
        if(q*j < a)
                j++;
        q *=j;
        int za = 1;
        int rq = sqrt(q);
        int me = 1;
        int meb = q;
        while((++za) <rq+1){
                if(q%(za) == 0){
                        me = za;
                        if(za >= a)
                                break;
                        if((q/za)>=a)
                                meb = q/za;
                        else
                                break;
                }
        }
        if(me < a)
                za = meb;
        else
                za = me;
        lli k = za - a;
        printf("%lld\n",k);
        return 0;
}

#include <stdio.h>
#define lli long long int
double sqrt(double i){
        double a = 2.0;
        int k = 100;
        while(k-->0){
                a = (a+i/a)/2.0;
        }
        return a;
}
int main(void){
        lli a,b;
        scanf("%lld %lld",&a,&b);
        if(a == b){
                printf("0\n");
                return 0;
        }
        if(a > b){
                int ch = a;
                a = b;
                b = ch;
        }
        lli q = b - a;
        lli j = a/q;
        if(q*j < a)
                j++;
        q *=j;
        int za = 1;
        int rq = sqrt(q);
        int me = 1;
        int meb = q;
        while((++za) <rq+1){
                if(q%(za) == 0){
                        me = za;
                        if(za >= a)
                                break;
                        if((q/za)>=a)
                                meb = q/za;
                        else
                                break;
                }
        }
        if(me < a)
                za = meb;
        else
                za = me;
        lli k = za - a;
        printf("%lld\n",k);
        return 0;
}

#include <stdio.h>
#define lli long long int
int main(void){
        lli a,b;
        scanf("%lld %lld",&a,&b);
        if(a == b){
                printf("%lld\n",a);
                return 0;
        }
        if(a > b){
                int ch = a;
                a = b;
                b = ch;
        }
        lli q = b - a;
        lli j = a/q;
        if(q*j < a)
                j++;
        q *=j;
        int za = a-1;
        while(q%(++za) != 0);
        lli k = za - a;
        printf("%lld\n",k);
        return 0;
}

#include <stdlib.h>
#include <stdio.h>

typedef long long int lli;

#define TRUE         (1==1)
#define FALSE        (!TRUE)

#define fo3(a,b,c)   for(a=(int)(b);a<=(int)(c);a++)
#define of3(a,b,c)   for(a=(int)(b);a>=(int)(c);a--)
#define in32(a)      scanf("%d",&(a))
#define in64(a)      scanf("%I64d",&(a))
#define out32(a)     printf("%d\n",(a))
#define out64(a)     printf("%I64d\n",(a))
#define instr(a)     scanf("%s",(a))
#define outstr(a)    printf("%s\n",(a))
#define max(a,b)     (((a)<(b))?(b):(a))
#define min(a,b)     (((a)>(b))?(b):(a))

lli gcd(lli a, lli b) {
    return (b == 0) ? a : gcd(b, a % b);
}
lli lcm(lli a, lli b) {
    lli g = gcd(a, b);
    return a * (b / g);
}

int facts(lli val, lli * arr, int st) {
    if (val == 1) {
        arr[0] = 1;
        return 1;
    }
    int i = st,k;
    while (i * i <= val) {
        if (val % i == 0) {
            int pow = 0;
            while (val % i == 0) {
                pow ++;
                val/=i;
            }
            int cur = facts(val,arr,i+1);
            int res = cur * (pow + 1);
            fo3(k,cur,res-1)
                arr[k] = arr[k-cur]*i;
            return res;
        }
        i++;
    }
    arr[0] = 1;
    arr[1] = val;
    return 2;
}

int main(void)
{
    lli x, y;
    int i;
    in64(x);
    in64(y);
    if (x < y) {
        x^=y;
        y^=x;
        x^=y;
    }
    lli diff = x - y;
    if (x == y) {
        out64(0);
        return EXIT_SUCCESS;
    }
    lli ans = 0;
    lli best = lcm(x, y);

    lli arr[2000];
    int num = facts(diff, arr, 2);
    fo3(i,0,num-1) {
        lli m = x % arr[i];
        if (m==0)
            m = diff;
        lli add = diff - m;
        lli tmp = lcm(x+add, y+add);
        if (tmp < best || (tmp == best && add < ans)){
            best = tmp;
            ans = add;
        }
    }
    out64(ans);
    return EXIT_SUCCESS;
}

#include <stdlib.h>
#include <stdio.h>

typedef long long int lli;

#define TRUE         (1==1)
#define FALSE        (!TRUE)

#define fo3(a,b,c)   for(a=(int)(b);a<=(int)(c);a++)
#define of3(a,b,c)   for(a=(int)(b);a>=(int)(c);a--)
#define in32(a)      scanf("%d",&(a))
#define in64(a)      scanf("%I64d",&(a))
#define out32(a)     printf("%d\n",(a))
#define out64(a)     printf("%I64d\n",(a))
#define instr(a)     scanf("%s",(a))
#define outstr(a)    printf("%s\n",(a))
#define max(a,b)     (((a)<(b))?(b):(a))
#define min(a,b)     (((a)>(b))?(b):(a))

int main(void)
{
    lli x, y;
    in64(x);
    in64(y);
    if (x < y) {
        x^=y;
        y^=x;
        x^=y;
    }
    lli diff = x - y;
    if (diff == 0 || y == 1) {
        out64(x*0);
        return EXIT_SUCCESS;
    }
    lli m = x % diff;
    if(m==0)
        m = diff;
    out64(diff-m);
    return EXIT_SUCCESS;
}

#include<stdio.h>
#include<string.h>
#define MAX 100000
/*int temp[MAX];
void mergesort(int a[],int b[],int indices[],int first,int last)
{
    if(first==last) return;
    int middle=(first+last)/2;
    mergesort(a,b,indices,first,middle);
    mergesort(a,b,indices,middle+1,last);
    int i,j,k;
    for(i=first,j=first,k=middle+1;i<=last;i++)
    {
        if(j==middle+1) temp[i]=indices[k++];
        else if(k==last+1) temp[i]=indices[j++];
        else if(a[indices[k]]-b[indices[k]]>a[indices[j]]-b[indices[j]]) temp[i]=indices[k++];
        else temp[i]=indices[j++];
    }
    for(i=first;i<=last;i++)
    {
        indices[i]=temp[i];
    }
}*/
int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    if(a>b)
    {
        int c=a;
        a=b;
        b=c;
    }
    if(b%a==0) printf("0");
    else if(b/a>1)
    {
        int c=(b/a)-1;
        int d=(b/a);
        for(d=(b/a);d>1;d--)
        {
            int q=(b-a*d)/(d-1);
            if(q>0)
            {
                printf("%d",q);
                return 0;
            }
        }
    }
    else
    {
        int p=a/(b-a)+(a%(b-a)>0);
        //printf("p=%d\n",p);
        long long int k=(b-a);
        //printf("k=%I64d\n",k);
        k=k*p;
        //printf("k=%I64d\n",k);
        k=k-a;
        //printf("k=%I64d\n",k);
        printf("%I64d",k);

    }
    return 0;
}

#include<stdio.h>
#include<string.h>
#define MAX 100000
/*int temp[MAX];
void mergesort(int a[],int b[],int indices[],int first,int last)
{
    if(first==last) return;
    int middle=(first+last)/2;
    mergesort(a,b,indices,first,middle);
    mergesort(a,b,indices,middle+1,last);
    int i,j,k;
    for(i=first,j=first,k=middle+1;i<=last;i++)
    {
        if(j==middle+1) temp[i]=indices[k++];
        else if(k==last+1) temp[i]=indices[j++];
        else if(a[indices[k]]-b[indices[k]]>a[indices[j]]-b[indices[j]]) temp[i]=indices[k++];
        else temp[i]=indices[j++];
    }
    for(i=first;i<=last;i++)
    {
        indices[i]=temp[i];
    }
}*/
int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    if(a>b)
    {
        int c=a;
        a=b;
        b=c;
    }
    if(b/a>1)
    {
        int c=(b/a)-1;
        int d=(b/a);
        for(d=(b/a);d>1;d--)
        {
            int q=(b-a*d)/(d-1);
            if(q>0)
            {
                printf("%d",q);
                return 0;
            }
        }
    }
    else
    {
        if(b==a)
        {
            printf("0");
        }
        else
        {
            int p=a/(b-a)+(a%(b-a)>0);
            //printf("p=%d\n",p);
            long long int k=(b-a);
            //printf("k=%I64d\n",k);
            k=k*p;
            //printf("k=%I64d\n",k);
            k=k-a;
            //printf("k=%I64d\n",k);
            printf("%I64d",k);
        }
    }
    return 0;
}

#include <stdio.h>

int main() {
	int a, b, c, x;
	long long k, k_, min, ab;

	scanf("%d%d", &a, &b);
	if (a == b) {
		printf("%d\n", a);
		return 0;
	}
	if (a > b)
		c = a, a = b, b = c;
	min = (long long) a * b, k_ = 0;
	for (c = 1; c * c <= b - a; c++)
		if ((b - a) % c == 0) {
			x = c;
			k = (x - a % x) % x;
			ab = (a + k) * (b + k) / x;
			if (min > ab || (min == ab && k_ > k))
				min = ab, k_ = k;
			x = (b - a) / c;
			k = (x - a % x) % x;
			ab = (a + k) * (b + k) / x;
			if (min > ab || (min == ab && k_ > k))
				min = ab, k_ = k;
		}
	printf("%lld\n", k_);
	return 0;
}

#include<stdio.h>
int main()
{
    int a,b,temp,c,d;
    scanf("%d %d",&a,&b);
    if(a>b)
    {
        temp=a;
        a=b;
        b=temp;
    }
    if(a==b)
    {printf("0\n");return 0;}
    c=b-a;
    d=a%c;
    if(d==0)
    {printf("0\n");return 0;}
    else
    {
        printf("%d\n",c-d);
        return 0;
    }
}

#include<stdio.h>
int main()
{
    int a,b,temp,c,d;
    scanf("%d %d",&a,&b);
    if(a>b)
    {
        temp=a;
        a=b;
        b=temp;
    }
    if(a==b||b%a==0)
    {printf("0\n");return 0;}
    c=b-a;
    d=a%c;
    if(d==0)
    {printf("0\n");return 0;}
    else
    {
        printf("%d\n",c-d);
        return 0;;
    }
}

#include<stdio.h>
int gcd(int a,int b){
	int t;
	while(b>0){
		t=a%b;
		a=b;
		b=t;
	}
	return a;
}
int main()
{
	long long a,b;
	scanf("%I64d %I64d",&a,&b);
	long long t;
	if(a>b){
		t=a;
		a=b;
		b=t;
	}
	t=b-a;
	long long k=0;
	long long k1;
	long long min=a*b/gcd(a,b);
	for(long long i=1;i*i<=t;i++){
		k1=i-b%i;
		if((a+k1)*(b+k1)<min*gcd(a+k1,b+k1)){
			min=(a+k1)*(b+k1)/gcd(a+k1,b+k1);
			k=k1;
		}
		k1=(t/i)-b%(t/i);
		if((a+k1)*(b+k1)<min*gcd(a+k1,b+k1)){
			min=(a+k1)*(b+k1)/gcd(a+k1,b+k1);
			k=k1;
		}
	}
	printf("%I64d\n",k);
	return 0;
}

#include<stdio.h>
int gcd(int a,int b){
	int t;
	while(b>0){
		t=a%b;
		a=b;
		b=t;
	}
	return a;
}
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	int t;
	if(a>b){
		t=a;
		a=b;
		b=t;
	}
	t=b-a;
	int k=0;
	int k1;
	int min=a*b/gcd(a,b);
	for(int i=1;i*i<=t;i++){
		k1=i-a%i;
		if((a+k1)*(b+k1)<min*gcd(a+k1,b+k1)){
			min=(a+k1)*(b+k1)/gcd(a+k1,b+k1);
			k=k1;
		}
		k1=(t/i)-a%(t/i);
		if((a+k1)*(b+k1)<min*gcd(a+k1,b+k1)){
			min=(a+k1)*(b+k1)/gcd(a+k1,b+k1);
			k=k1;
		}
	}
	printf("%d\n",k);
	return 0;
}


#include<stdio.h>
int main()
{
    unsigned long long int a,b,s;
    scanf("%llu %llu",&a,&b);
    s=a/b;
    if(s%2!=0)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
	long long int n,k,temp;
	scanf("%lld%lld",&n,&k);

	temp=n/k;
	if(temp%2==0)
	{
		printf("No");
	}
	else
	{
		printf("Yes");
	}
}

#include<stdio.h>
#include<math.h>
typedef long long num;
 int main()
{
   num k,n,ara;
scanf("%I64d %I64d",&k,&n);
ara=k/n;
if(ara%2==1 || ara==1)
printf("YES");
else
printf("NO");

return 0;
}

#include<stdio.h>
int m;
int oddeven(int n)
{
    if(n%2==0)
    {
        m=1;
    }
    else
    {
        m=0;
    }

}
int main()
{
    long long a,b;
    int j;
    scanf("%lld",&a);
    scanf("%lld",&b);
    int i=1;
    if(b==1)
    {
        if(a%2==0)
        {
            printf("NO");
        }
        else
        {
            printf("YES");
        }
    }
    else
    {
        j=a/b;

        oddeven(j);
        {
            if(m==1)
            {
                printf("NO");
            }
            else
            {
                printf("YES");
            }
        }
    }
}

#include<stdio.h>

int main(){

long long int n, k;

scanf("%I64d %I64d", &n , &k);

// if(n!= 1)
// printf("%I64d %I64d\n" , n ,k);

long long int odd_even = n/k;

// if(n!=1){
// printf("%I64d\n" , odd_even );
// printf("%I64d\n" , odd_even%2 );
// }

if(odd_even%2 == 0)
    printf("NO");
else
    printf("YES");

}

#include<stdio.h>
long long n,m,srx;
int main()
{
    scanf("%lld%lld",&n,&m);
    srx=n/m;
    if(srx%2)
    printf("YES");
    else
    printf("NO");
    return 0;
}
//nmd

#include<stdio.h>
int main(void)
{
    long long int n,k;
    scanf("%lld %lld",&n,&k);
    if((n/k)%2==1){
        printf("YES\n");
    }
    else{
        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b;
    scanf("%lld%lld",&a,&b);
    if((a/b)%2==1)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
  unsigned long long int n=1000000000000000000,k=1,i;

scanf("%lld %lld",&n,&k);
//for(i=1;k<=n;i++){ n=n-k;
//}
n=n/k;
  if(n%2==1){printf("YES");}

else
printf("NO") ;
return 0;
}

#include<stdio.h>
int main()
{
	long long n,k;
	scanf("%lld%lld",&n,&k);
	if(n==k)
	{

		printf("YES");
	}
	else
	{
		n=n/k;
	 if(n==1||n%2!=0)

		{
			printf("YES");

		}
		else
		printf("NO");

	}

return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{

    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
     #endif
    long long int n,k;scanf("%lld %lld",&n,&k);
    int r;
    r=n/k;
    if(r%2==0)printf("NO");
    else printf("YES");}

#include <stdio.h>

int main()
{
	long long n, k;
	scanf("%lld%lld", &n, &k);
	if((n / k) % 2 == 1)
		printf("YES");
	else
		printf("NO");
}

#include<stdio.h>
int main()
{
	long long int n,k,m;
	scanf("%lld%lld",&n,&k);
	m=n/k;
	if(m%2==0)
	printf("NO");
	else
	printf("YES");
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long int n,k,l;
    scanf("%lli %lli",&n,&k);
    l=n/k;
    if(l%2==0){
        printf("NO");
    }
    else{
        printf("YES");
    }
    return 0;
}

#include<stdio.h>
#include<math.h>

int main()
{
   long long n,i,a,b,c ;

   scanf("%lld %lld",&n,&a) ;

   i=n/a ;
   if(i%2!=0)
    {
        printf("Yes") ;
    }
   else
   {
       printf("No") ;
   }

   return 0 ;

}

#include<stdio.h>
main()
{
    long long i,n,j,k,x,y;
    scanf("%I64d %I64d",&n,&k);
    x=n/k;
    if(x%2==1)
    {
        printf("YES");
    }
    else{
        printf("NO");
    }
}

#include<stdio.h>
int main()
{
    long long int n,k,a;
    scanf("%lld %lld",&n,&k);
    a=n/k;
    if(a%2!=0) printf("YES");
    else printf("NO");

    return 0;
}

#include<stdio.h>
int main()
{
     long long int n,k,x;
    scanf("%lld %lld",&n,&k);
    x=n/k;
    if(x%2==1)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
    return 0;
}

#include <stdio.h>
#define ll long long

int main()
{
	ll n, k;
	//unsigned long long int k;
	scanf("%lld %lld", &n, &k);
	//printf("%lld\n", (long long)n);
	/*
	if(k == 1)
	{
		if(n & 1)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	*/
	if((long long int)(n / k) % 2)
	{
		printf("YES\n");
	}
	else
	{
		printf("NO\n");
	}
	return 0;
}

#include<stdio.h>
int main()
{
    long long n,k,s;
    scanf("%lld %lld",&n,&k);
    s=n/k;
    if(s%2==0)
    {
        printf("NO");
    }
    else
    {
        printf("YES");
    }
    return 0;
}

#include<stdio.h>
int main()
{
	long long int n,k,s;
	scanf("%lld %lld",&n,&k);
	s=n/k;
	if(s%2==1)
	printf("YES");
	else
	printf("NO");

}

#include <stdio.h>

int main()
{
    long long n,k;
    scanf("%I64d%I64d",&n,&k);

    n = n / k;

    if(n%2==0) printf("NO\n");
    else printf("YES\n");

    return 0;
}

#include <stdio.h>

int main()
{
    long long n,k;
    scanf("%lld%lld",&n,&k);

    if((n/k)%2==0){
        printf("NO\n");
    }

    else{
        printf("YES\n");
    }

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
int main(){
long long n,k;
scanf("%lld %lld",&n,&k);
if((n/k)%2==0){
    printf("NO\n");
}
else{
    printf("YES\n");
}
return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <string.h>
int main(int argc, char const *argv[])
{
	long long n,k;
	scanf("%I64d %I64d",&n,&k);
	long long temp=n/k;
	if(temp%2==1){
		printf("YES");
	}else{
		printf("NO");
	}
	return 0;
}

main() { long long n,k; scanf("%I64d%I64d",&n,&k);int j=n/k; printf(j%2?"YES":"NO"); }

#include<stdio.h>

int main(){

	long long int n ,k;
	scanf("%I64d%I64d" ,&n ,&k);
	if((n/k)%2) printf("Yes\n");
	else printf("No\n");

	return 0;
}

#include <stdio.h>
int main()
{
	unsigned long long n, k, t;
	n = 0;
	n--;
	scanf("%llu %llu", &n, &k);
	if (k < 500000000000000000) {
		if (n % (2 * k) < k)
			printf("NO");
		else
			printf("YES");
	} else {
		t = 0;
		while (1) {
			n = n - k;
			t++;
			if (n < k)
				break;
		}
		if (t % 2 == 1)
			printf("YES");
		else
			printf("NO");
	}
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long n,k;
    scanf("%I64d %I64d",&n,&k);
    ((n/k)%2==0)? (printf("NO\n")):(printf("YES\n"));
    return 0;
}

#include<stdio.h>

int main()
{
    long long int n,k,l;

    scanf("%lld %lld",&n,&k);

    l = n/k;

    if(l%2==0)
    {
        printf("NO");
    }
    else
    {
        printf("YES");
    }

    return 0;
}

#include <stdio.h>

int main ()
{
    unsigned long long int n, k;
    scanf("%llu %llu", &n, &k);
    if((n % k) == 0)
    {
        if(((n / k) % 2) == 0)
        {
            printf("NO\n");
        }
        else
        {
            printf("YES\n");
        }
    }
    else
    {
        if(((n / k) % 2) == 0)
        {
            printf("NO\n");
        }
        else
        {
            printf("YES\n");
        }
    }

    return 0;
}

#include<stdio.h>
int main()
{
  long long int a,b;
    scanf("%lld %lld",&a,&b);
    if((a/b)%2==0)
        printf("NO\n");
    else
            printf("YES\n");
    return 0;
}

#include <stdio.h>
int main(){
	long long int n,k;
	scanf("%lld%lld",&n,&k);
	if((n/k)%2==0){
		printf("NO");
		return 0;
	}else if((n/k)%2==1){
		printf("YES");
		return 0;
	}
}

#include<stdio.h>
#include<string.h>
int main()
{
  __int64 k,n,m;
  scanf("%I64d%I64d",&n,&k);
  m = n/k;
  if(m%2==0)
  printf("NO");
  else
  printf("YES");
}

#include <stdio.h>
int main(void)
{
	long long n,k;
	scanf("%lld%lld",&n,&k);
	if((n/k)%2==0)
		printf("NO");
	else
		printf("YES");

	return 0;
}

#include <stdio.h>
int main()
{
    long long int n, k, win;
    scanf("%lld %lld", &n, &k);
    win = n/k;
    if(win%2==1)
        printf("YES");
    else printf("NO");
    return 0;
}

#include<stdio.h>
int main()
{
    long long i,j,k,n,m;

    scanf("%lld%lld",&n,&k);

    m = n/k;
    if(m % 2 != 0)
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

#include<stdio.h>
int main()
{
    long long int x,y,z;
    scanf("%lld%lld",&x,&y);
    z=x/y;
    if(z%2==0)
        printf("NO\n");
    else
        printf("YES\n");
}

#include<stdio.h>
int main()
{
    long long int n,k,i,count=0;
    scanf("%lld %lld",&n,&k);
    count=n/k;
    if(count%2==0)
    {
        printf("NO\n");
    }
    else
    {
        printf("YES\n");
    }
}

#include<stdio.h>
int main()
{
  long long int n,k,i,j,x,y,z;
  scanf("%lld %lld",&n,&k);
  x=n/k;
  if(x%2!=0)
  {
      printf("YES\n");
  }
  else
  {
      printf("NO\n");
  }

}

#include<stdio.h>
main()
{
    long long n, k, c;
    scanf("%lld%lld",&n,&k);
    c = n/k;
    if(c%2==1)printf("YES");
    else printf("NO");
}

#include<stdio.h>
int main()
{
    long long int n,k;
    scanf("%I64d %I64d",&n,&k);
    if((n/k)%2==1)printf("YES");
    else printf("NO");
    return 0;
}

#include<stdio.h>
int main()
{
    long long int n,k,c;
    scanf("%I64d %I64d",&n,&k);

    c=n/k;
    if(c%2==1)
    {
        printf("YES");
    }
    else
    {
        printf("NO");
    }
    return 0;
}

#include <stdio.h>

int main(void)
{
	long long n, k;
	int rest = 1;
	scanf("%I64d %I64d", &n, &k);
	rest = (n / k) % 2;
	if (rest)
		puts("YES");
	else
		puts("NO");
	return 0;
}

#include<stdio.h>
int main()
{
    long long n,k;
    while(~scanf("%lld%lld",&n,&k))
    {
        long long s=n/k;
        if(s%2==1)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long n,k;
    int q;

    scanf("%I64d %I64d",&n,&k);
    q=n/k;

    if (q%2==0)
        printf("NO");
    else
        printf("YES");

    return 0;
}

#include<stdio.h>
main()
{
long long int n,k;
scanf("%I64d%I64d",&n,&k);
if((n/k)%2!=0)
{
printf("YES");
}
else
{
printf("NO");
}
}

#include<stdio.h>
int main()
{
long long int n,k,a,b;
scanf("%lld %lld",&n,&k);
a=n%k;
n = n-a;
b=n/k;
if(b%2==0){
printf("No");
}
else
printf("Yes");
}

#include<stdio.h>

int m [700000];

int main()
{
    long long int a,n,k;

    scanf("%I64d %I64d", &n,&k);

    a = n / k;

    if(n == k || a % 2 == 1)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }

    return 0;
}

#include<stdio.h>
int main()
{

    long long n, k, l;
    scanf("%lld %lld", &n, &k);

    l=n/k;

    if(l%2==0)
    {
        printf("NO");
    }
    else  {
        printf("YES");
    }

    return 0;
}

#include<stdio.h>
int main()
{
    long long int i,j,n,k,a,b,c;
    scanf("%lld%lld",&n,&k);
    c=n/k;
    if(c%2!=0)
    {
       printf("YES");
    }
    else
    {
        printf("NO");
    }

}

#include<stdio.h>
#include<stdlib.h>
void main()
{
long long n,k;
scanf("%lld %lld",&n,&k);

if((n/k)%2==0)
	printf("NO\n");
else
	printf("YES\n");
exit(0);

}

/* Problem: 832A - Sasha and Sticks */
/* Author: Gusztav Szmolik */

#include <stdio.h>

int main ()
    {
    unsigned long long n;
    unsigned long long k;
    unsigned long long mod;
    unsigned long long div;

    if (scanf("%I64u %I64u",&n,&k) != 2)
        return -1;
    if (n < 1 || n > 1000000000000000000UL || k < 1 || k > 1000000000000000000UL)
        return -1;
    if (k > n)
        return -1;
    mod = n%k;
    div = (n-mod)/k;
    printf (div%2 ? "YES\n" : "NO\n");
    return 0;
    }

#include<stdio.h>
#include<math.h>

int main()
{
    unsigned long long int a,b,c,d;
    scanf("%llu%llu",&a,&b);
    if(a==b)
        printf("YES\n");
    else
    {
        c=(a/b);
        d=a%b;
        if(c%2==0)
            printf("NO\n");
        else if(c%2!=0)
            printf("YES\n");
    }

    return 0;
}

#include<stdio.h>

int main()
{
    long long n,k;

    scanf("%I64d %I64d",&n,&k);

    if((n/k)%2!=0)
        printf("Yes\n");
    else
        printf("No");

    return 0;
}

#include <stdio.h>
int main(void)
{
    long long int n, k, x;
    scanf("%lld %lld", &n, &k);
    x = n / k;
    if(x % 2 != 0)
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

#include <stdio.h>
long long int n,k,a;
int main ()
{
	scanf("%lld %lld", &n, &k);
	if((n/k)%2==0)
	printf("NO");
	if((n/k)%2==1)
	printf("YES");

}

#include <stdio.h>

int main()
{
    long long int n,k,div;
    scanf("%I64d %I64d",&n,&k);
    div=n/k;
    if(div%2!=0)
        printf("YES");
    else
        printf("NO");
    return 0;
}

int main()
{
    long long int n,k,a,b,c;
    scanf("%I64d %I64d",&n,&k);
    if ((n/k)%2==0)
        printf("NO");
    else
        printf("YES");
    return 0;
}

#include<stdio.h>
main()
{
	 long long int n,k;
	scanf("%I64d %I64d",&n,&k);
	long long int remainder=n/k;
	//printf("%I64d",remainder);
	if(remainder%2==1)
		printf("YES");
	else
		printf("NO");
}

#include <stdio.h>
int main() {
long long n, k;
scanf("%lld %lld", &n, &k);
if(((n / k) & 1) == 0)
printf("NO");
else
printf("YES");
return 0;

}

#include <stdio.h>
#include <string.h>

int main()
{
    unsigned long long int n, k, m;
    scanf("%llu %llu", &n, &k);
    m = n/k;
    if(n%k == 0 && m%2 == 1)
    {
        printf("YES\n");
    }
    else if(n%k == 0 && m%2 == 0)
    {
        printf("NO\n");
    }
    else if(m%2 == 1 && n%k != 0)
    {
        printf("YES\n");
    }
    else if(m%2 == 0 && n%k != 0)
    {
        printf("NO\n");
    }
         return 0;

    }

#include <stdio.h>
int main()
{
    long long int n,k,m;
    scanf("%I64d%I64d ",&n,&k);
    m=n/k;
    if(m%2==1)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
	unsigned long long int n,k;
	scanf("%llu %llu",&n,&k);

	unsigned long long int t=n/k;

	if(t%2==1)
	printf("YES\n");
	else
	printf("NO\n");

	return 0;
}

#include <stdio.h>
#include <inttypes.h>

int main()

{
    int64_t n,k;

    scanf("%"SCNd64,&n);
    scanf("%"SCNd64,&k);

    printf("%s",(n/k)%2==0?"NO":"YES");

    return 0;
}

#include<stdio.h>
int main()
{
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
	#endif

    long long int n,k,lcount=0,scount=0,i=1;
    scanf("%lld%lld",&n,&k);

    if((n/k)%2==0)
    {
    	printf("NO\n");
    }
    else
    {
    	printf("YES\n");
    }
}

#include<stdio.h>
int main(){
long long int a,b,c,d,e,x,y,z;

scanf("%lld %lld",&a,&b);
x=a/b;
y=x%2;
if(y!=0){
printf("YES");
}else {
printf("NO");
}
return 0;
}

#include<stdio.h>
int main()
{
  long long int i,n,k,a;
  scanf("%lld %lld",&n,&k);
  a = n/k;
  if(a%2 !=0){
   printf("YES\n");
  }
  else printf("NO\n");
   return 0;
}

#include<stdio.h>
int main()
{
    long long int a,b,c;
    scanf("%I64d %I64d",&a,&b);
    c=a/b;
    while (a>0 && b>0)
    {

    if(a%b>=0 && c%2!=0)
    {
        printf("YES\n"); break;
    }
    else if(a%b==0 && c%2==0)
    {
        printf("NO\n"); break;
    }
    else
    {
        printf("NO\n"); break;
    }
    }
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int main()
{
// int t=50;
 //	while(t--){
 	unsigned long long x,y,z;
 	scanf("%llu%llu",&x,&y);
 	z=x/y;
 	if(z%2==1)
 		printf("YES\n");
 	else
 		printf("NO\n");
 //}
return 0;
}

#include <stdio.h>

void play(int *n, int k);

main()
{
	unsigned long long n, k;

	scanf("%llu %llu", &n, &k);

	if ((n/k) % 2 == 1)
		printf("YES");
	else
		printf("NO");

}

#include<stdio.h>

int main(){
    long long int n,k;
    scanf("%lld %lld",&n,&k);
    n/=k;
    printf(n%2 ? "YES" : "NO");
    return 0;
}

#include <stdio.h>
int main()
{
      long long  num,k,c;
	scanf("%lld%lld",&num,&k);
	c=num/k;
	if(c%2==0)
	printf("NO\n");
	else
	printf("YES\n");
	return 0;
}

#include<stdio.h>
int main(void)
{

    long long int count=0;
    long long int n,k,i;
    while(scanf("%I64d %I64d",&n,&k)==2){

    if((n/k)&1)printf("YES\n");
    else printf("NO\n");
    }
    return 0;
}

    #include <stdio.h>
    int main()      /*this code is written by 190042146*/
{
    long long int n, k;

    scanf("%lld%lld", &n, &k);

    if ( (n/k)%2!=0)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }

    return 0;
}

#include<stdio.h>
int main()
{
    long long int n,k;
    scanf("%lld%lld",&n,&k);

    if ((n/k)%2==0)
        printf("NO");
    else
        printf("YES");
    return 0;
}

#include<stdio.h>
int main(){
    long long n,k,l;
    scanf("%I64d %I64d",&n,&k);
    l=n/k;
    if(l%2==1){
        printf("YES");
    }else {
        printf("NO");
    }
return 0;
}

#include <stdio.h>
#include <stdlib.h>
int compare(void *,void *);
int main(int argc, char *argv[])
{
	long long int a,b;
	scanf("%lld %lld",&a,&b);

	if(a%(2*b)>=b)
		printf("YES");
	else
		printf("NO");
}

#include<stdio.h>
#include<math.h>
int main()
{
    long long int n,m;
    scanf("%lld%lld",&n,&m);
    int c=n/m;
   // printf("%d",n/m);
    if(c%2==0)
    {
        printf("NO\n");
    }
    else
    {
        printf("YES\n");
    }
}

#include <stdio.h>
#include <stdlib.h>

int main(){
	long long m,k;
	scanf("%lld %lld",&m,&k);
	long long r=m/k;
	if(r%2==1){
		printf("YES\n");
	}
	else printf("NO\n");
	return 0;
}

#include<stdio.h>
int main()
{
    long long int moves,n,k;
    scanf("%I64d %I64d",&n,&k);
    moves=n/k;
      if(  moves%2==0)
            printf("NO");
        else
            printf("YES");

        return 0;

}

#include<stdio.h>
int main()
{
    unsigned long long int i, j;
    while(scanf("%I64d %I64d", &i, &j) != EOF)
    {
        unsigned long long int k, q;
        k = i / j;
        q = i % j;
        if(k % 2 == 0 && q == 0){
            printf("YES\n");
        }
        else if(k % 2 == 0 && q != 0){
            printf("NO\n");
        }
        else if(k % 2 != 0 && q == 0){
            printf("YES\n");
        }
        else if(k % 2 != 0 && q != 0){
            printf("NO\n");
        }
    }
}

#include <stdio.h>

int main()
{
    int n, k;
    scanf("%d %d", &n, &k);
    puts((n / k) & 1 ? "YES" : "NO");
    return 0;
}

#include <stdio.h>

int main()
{
	long long m,n;
	scanf("%ld %ld",&m,&n);

	long long a=m/n;
	if(a%2)
	{
		printf("YES");
	}
	else printf("NO");

	return 0;
}

#include<stdio.h>
int main()
{
	int n,k,c;
	scanf("%d%d",&n,&k);
	if ((n/k)!=0) printf("YES");
	else printf("NO");
	return 0;
}

#include<stdio.h>
int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    if(n/k==0){
        printf("yes");
    }
    else{
        printf("no");
    }
    return 0;
}

#include<stdio.h>
int main ()
{
   unsigned long long a,b,c;
   scanf("%u%u",&a,&b);
   c=a/b;
   if(c%2==0)printf("NO\n");
   else printf("YES\n");
    return 0;

}

#include <stdio.h>
#include <inttypes.h>

int main()

{
    int64_t n,k;

    scanf("%"SCNd64,&n);
    scanf("%"SCNd64,&k);

    printf("%s",n%k==0?"YES":"NO");

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
int main(){
long long n,k;
scanf("%lld %lld",&n,&k);
if((n*k)%2==0){
    printf("NO\n");
}
else{
    printf("YES\n");
}

return 0;
}

#include<stdio.h>
int main()
{
    long long signed i,t,n,k;
    scanf("%lld%lld",&n,&k);
    for(i=0;i<=n;i++)
  t=n/k;

  if(n%2==0)
        printf("NO");
    else
        printf("YES");
    return 0;
}

#include <stdio.h>
int main()
{
	int n,k,s=0,l=0;
	scanf("%d%d",&n,&k);
	while(n>=k)
	{
		n=n-k;
		s++;
		if(n>=k)
		{
		    l++;
		    n=n-k;
		}
	}
	if(s>l)
	printf("YES\n");
	else
	printf("NO\n");
    return 0;
}

#include <stdio.h>

int game(int totalstick, int stickperturn)
{
    int isSasha = 1;

    while(totalstick >= stickperturn){
        totalstick = totalstick - stickperturn;
        if(isSasha)
            isSasha = 0;
        else
            isSasha = 1;
    }
    if(!isSasha)
        printf("YES");
    else
        printf("NO");
}
int main()
{
    int tot, turn;
    scanf("%d", &tot);
    scanf("%d", &turn);

    game(tot, turn);

    return 0;
}

#include <stdio.h>
int main()
{
	unsigned long long n, k, t;
	scanf("%d %d", &n, &k);
	t = 2 * k;
	while (n > t)
		n = n - t;
	if (n < k)
		printf("NO");
	else
		printf("YES");
	return 0;
}

#include<stdio.h>
int main ()
{
    int a,b;
    scanf("%d %d",&a,&b);
    if((a/b)==0)
        printf("NO\n");
    else
        printf("YES");
    return 0;
}

#include <stdio.h>

 int n,k,m;

int main(){
	scanf("%d %d",&n,&k);
	m=n/k;
	if(m%2==0)
	printf("NO");
	else
	printf("YES");
	return 0;
}

#include<stdio.h>
int main()
{
    int n, k, a;
    scanf("%d %d", &n, &k);
    a = n/k ;
    if(a%2==0) printf("NO\n");
    else printf("YES\n");
}

#include<stdio.h>
int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    if(n%k==0)
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
	long n,k;
	scanf("%ld%ld",&n,&k);
	if(n==k)
	{

		printf("YES");
	}
	else
	{
		n=n/k;
	 if(n==1||n%2!=0)

		{
			printf("YES");

		}
		else
		printf("NO");

	}

return 0;
}

#include<stdio.h>

int main(){

long long int n, k;

scanf("%lld %lld", &n , &k);

printf("%I64d %I64d" , n ,k);

long long int odd_even = n/k;

if(odd_even%2 == 0)
    printf("NO");
else
    printf("YES");

}

#include <stdio.h>

int main(void)
{
	long long n, k;
	int rest;
	scanf("%l64d %l64d", &n, &k);
	rest = (n / k) & 1;
	if (rest)
		puts("YES");
	else
		puts("NO");
	return 0;
}

#include<stdio.h>
int main()
{
    long long int n,k;
    scanf("%lld %lld",&n,&k);
    if(n==k){
        printf("YES\n");
    }
    else if(n>k){
        printf("NO\n");
    }
    else if(n<k){
        printf("YES\n");
    }
    return 0;
}

#include <stdio.h>
int main()
{
long long num,k,c;
	scanf("%l64d%l64d",&num,&k);
	c=num/k;
	if(num-(c*k)>0)
	printf("NO\n");
	else
	printf("YES\n");
	return 0;
}

#include <stdio.h>

int main()

{
    int n,k;

    scanf("%d%d",&n,&k);

    printf("%s",n%k==0?"YES":"NO");

    return 0;
}

#include <stdio.h>
int main(){

int n,k,g,i;
scanf("%d %d",&n,&k);
for(i=1;i*k<=n;i++)
g=i;
if(g%2!=0) printf("Yes");
else printf("No");

return 0;

}

#include<stdio.h>
int main()
{
    int n,k,p;
    scanf("%d %d",&n,&k);

         p=n%k;
         if(p%2!=0)
         {printf("NO");}
         if(p%2==0)
         {printf("YES");}

}

#include<stdio.h>
int main()
{
    int n,k,p;
    scanf("%d %d",&n,&k);

         p=n/k;
         if(p%2!=0)
         {printf("YES");}
         if(p%2==0)
         {printf("NO");}

}

#include<stdio.h>
int main()
{
    long long int n,m;
    while(scanf("%I64d%I64d",&n,&m)==2)
    {
        if(n%m==0)
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

#include<stdio.h>
int main()
{
    long long int moves,n,k;
    scanf("%i64 %i64",&n,&k);
    moves=n/k;

        if(moves%2==0)
            printf("NO");
        else
            printf("YES");
        return 0;

}

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int main()
{
   // while(1){
    long long x,y,z;
    scanf("%lld%lld",&x,&y);
    z=x%y;

    if(z==0)
    	printf("YES\n");
    else if(z%2==1)
    	printf("YES\n");
    else
    	printf("NO\n");
    //}
return 0;
}

#include<stdio.h>
int main()
{
    int a,b,c,d;
    scanf("%d %d", &a ,&b);
    if (a%b==0){
        c=a/b;
        if (c%2==0){
            printf("NO");
        }
        else{
            printf("YES");
        }
    }
    else{
        if (c%2!=0){
            printf("NO");
        }
        else{
            printf("YES");
        }
    }
    return 0;
}

#include <stdio.h>
int main()
{
	long long int n,k;
	int c,c1,c2;
	c1=0;c2=0;
	scanf("%lld%lld",&n,&k);
	if(n < k)
		printf("NO");
	else if(n >= k)
	{
		c=1;
		while(n<k)
		{

			if(c%2 != 0)
				c1++;
			else
			{
				c2++;
			}
			c++;
			n=n-k;
		}
		if (c1>=c2)
			printf("YES");
		else
			printf("NO");
	}
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
       long n,k;
       scanf("%lld %lld",&n,&k);
       (n/k)%2==0?printf("NO"): printf("YES");

}

#include<stdio.h>
int main()
{
    long long int i,j,n,k,a,m,b;
    scanf("%lld%lld",&n,&k);
    a=b=0;
    m=0;
    for(i=1;i<=n-(n%k);i=i+k)
    {
        if(m==0)
        {
            a=a+k;
            m=1;
        }
        else
        {
            b=b+k;
            m=0;
        }
    }
    if(m==0)
    {
        a=a+(n%k);
    }
    else b=b+(n%k);
    if(a>b)
    {
        printf("YES");
    }
    else printf("NO");
}

#include <stdio.h>

int main() {
	long long n, k;
	scanf("%d %d", &n, &k);
	int t = n/k;
	if (t%2){
		printf("YES\n");
	}
	else{
		printf("NO\n");
	}
	return 0;
}

#include<stdio.h>
int main()
{
    int a,b,c;
    scanf("%d %d",&a,&b);
    c=a/b;
    while (a>0)
    {

    if(a%b>=0 && c%2!=0) printf("YES\n");
    else if(a%b==0 && c%2==0) printf("YES\n");
    else printf("NO\n"); break;
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <string.h>
int main(int argc, char const *argv[])
{
	long long n,k;
	scanf("%I64d %I64d",&n,&k);
	int temp=n%k;
	if(n==k){
		printf("YES\n");
	}
	if(temp%2==1){
		printf("YES");
	}else{
		printf("NO");
	}
	return 0;
}

#include <stdio.h>
int n,k,a;
int main ()
{
	scanf("%d %d", &n, &k);
	if((n/k)%2==0)
	printf("NO");
	if((n/k)%2==1)
	printf("YES");

}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long a,b;
    scanf("%l64d %l64d",&a,&b);
    if(a%b==0)
        printf("YES\n");
    else
        printf("NO\n");
}

#include<stdio.h>
int main()
{
   int n,k;
   scanf("%d %d",&n,&k);
   int b;
   b=floor((n*1.0)/k);
   if(b%2 ==0)
   {
      printf("NO");
   }
   else
   {
      printf("YES");
   }
   return 0;
}

#include<stdio.h>
int main()
{
    int n,k,c=0;
    scanf("%d%d",&n,&k);

    for(int i=k;i<=n;i=i+k)c++;
    if(c%2!=0)printf("YES");
    else printf("NO");
    return 0;
}

#include<stdio.h>

int main()
{
    long long n,k;
    scanf("%lld%lld",&n,&k);
    if(n<=4)
    {
         printf("YES");
         return 0;
    }

    long long m=n/k;
    if(m%2==1)
    {
        printf("YES");
    }
    else
    {
        printf("NO");
    }
    return 0;

}

#include <stdio.h>
int main()
{
	int num,k,c;
	scanf("%d%d",&num,&k);
	c=num/k;
	if(num-(c*k)>0)
	printf("NO\n");
	else
	printf("YES\n");
	return 0;
}

#include<stdio.h>
int main(){
long long int a,b,c,d,e,x,y,z;

scanf("%lld %lld",&a,&b);
x=a/b;
y=x%2;
if(y==0){
printf("YES");
}else {
printf("NO");
}
return 0;
}

#include <stdio.h>

int main(void)
{
	long long n, k;
	scanf("%l64d %l64d", &n, &k);
	if ((n / k) % 2 == 1)
		puts("YES");
	else
		puts("NO");
	return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main(){
	int n=0,k=0;
	scanf("%d %d",&n,&k);
	//printf("%d %d\n",n,k);
	int d;
	d=n/k;
	//printf("%d",d);
	//r=n%k;
	//printf("%d %d",n,k);

	if(d%2==1){
		printf("YES");
	}
	else {
		printf("NO");
	}
}

#include<stdio.h>
int main()
{
    int n,k;
    while(~scanf("%d%d",&n,&k))
    {
        int s=n/k;
        if(s%2==1)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

#include <stdio.h>
int main(){
	int n,k;
	scanf("%d%d",&n,&k);
	if((n/k)%2==0){
		printf("NO");
		return 0;
	}else if((n/k)%2==1){
		printf("YES");
		return 0;
	}
}

#include<stdio.h>

int main(){

long long int n, k;

scanf("%I64d %I64d", &n , &k);

if(n!= 1)
printf("%I64d %I64d\n" , n ,k);

long long int odd_even = n/k;

if(n!=1)
printf("%I64d\n" , odd_even );

if(odd_even%2 == 0)
    printf("NO");
else
    printf("YES");

}

#include<stdio.h>
int main()
{
    int i,j,k,n;

    scanf("%d%d",&n,&k);

    if((n/k) != 0)
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

#include<stdio.h>
main()
{
    int n,k,d,p;
    scanf("%d %d",&n,&k);
    if(n==k)
    {
        printf("YES");
    }
  if(n>k)
    {
        d=n/k;
        p=n-(d*k);
        if(k>p)
        {
            if(d%2==0)
            {
                printf("NO");
            }
            else
            {
                printf("YES");
            }
        }
    }
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <string.h>
int main(int argc, char const *argv[])
{
	long long n,k;
	scanf("%I64d %I64d",&n,&k);
	int temp=n%k;
	if(n==k){
		printf("YES\n");
		return 0;
	}
	if(temp%2==1){
		printf("YES");
	}else{
		printf("NO");
	}
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
  int k,n,m;
  scanf("%d%d",&n,&k);
  m = n/k;
  if(m%2==0)
  printf("NO");
  else
  printf("YES");
}

#include"stdio.h"
int main()
{
    long n,k;
    scanf("%ld %ld",&n,&k);
    if (n==k)   printf("YES");
    else if((n-k)%2==0) printf("NO");
    else   printf("YES");

    return 0;
}

#include<Stdio.h>
main()
{
    int n,m,a;
    scanf("%d%d",&n,&m);
a=n/m;
{
    if(a%2!=0)
        printf("YES");
    else
        printf("NO");
}

}

#include <stdio.h>

int main(){

    long long int n;
    long long int k;
    scanf("%l64d %l64d", &n, &k);

    long long int t = n/k;

    if(t%2==1){
        printf("YES\n");
        return 0;
    } else {
        printf("NO\n");
        return 0;
    }
}

#include<stdio.h>
int main()
{
    int n,k,x;
    scanf("%d %d",&n,&k);
    x=n/k;
    if(x%2==0)
        printf("NO\n");
    else printf("YES\n");
}

#include<stdio.h>

int main()
{
  long long int n,k;
  scanf("%lld %lld",&n,&k);

  if(n%k==0){
    printf("YES\n");
  }
  else{
    printf("NO\n");
  }

  return 0;
}

#include<stdio.h>
int main()
{
	long long int n,k,r;
	scanf("%lld%lld",&n,&k);
	r=n*k;
	if(r%2==0)
	printf("YES");
	else
	printf("NO");
	return 0;
}

#include<stdio.h>
int main()
{
	long long n, k, i, j;
	while (scanf("%I64d %I64d", &n, &k) != EOF)
	{
		if (n == 0 || k == 0)break;
		j = n - k;
		if (j < k)
		{
			printf("YES\n");
			continue;
		}
		if (j%k)i = (j / k) + 1;
		else i = j/k;
		if (j <= i*k)i = i;
		if (i % 2)printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

#include<string.h>
main() { char n[1000000],k[1000000]; scanf("%s %s",n,k); printf(strcmp(n,k)?"NO":"YES"); }

#include<stdio.h>

int main()
{
    int n,k,left=0,count=0,sum=0,i;

    scanf("%d %d",&n,&k);

    if(n==1 && k==1)
    {
        printf("YES");
        return 0;
    }

    for(i=0;i<1000;i++)
    {
        sum=k*i;
        if(n<sum)
        {
            break;
        }
    }

    if(n<sum)
    {
        if(i%2==0)
        {
            printf("NO");
        }
        else
        {
            printf("YES");
        }
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    long long a,i,b,c=0,d=0;
    scanf("%I64d %I64d",&a,&b);
    for(i=1;i<=a;i++){
        if(i%2!=0){
            a=a-b;
            c++;}
        else if(i%2==0&&a>=b){
            a=a-b;
            d++;}
    }
    if(c>d)
        printf("YES\n");
    else
        printf("NO\n");
}

#include<stdio.h>
int main()
{
	int n,k,i=1,c1=0,c2=0;
	scanf("%d%d",&n,&k);

	while (n>0){
		n-=k;
		if (i%2!=0) c1++;
		else c2++;
		i++;
	}
	if (c1>c2) printf("YES");
	else printf("NO");
	return 0;
}

#include<stdio.h>

int main()
{
    int n,k,left=0,count=0,sum=0,i;

    scanf("%d %d",&n,&k);

    left=n/k;

    if(n%k==0)
    {
        printf("YES");
    }
    else if(left%2==0)
    {
        printf("NO");
    }
    else if(left%2!=0)
    {
        printf("YES");
    }

    return 0;
}

#include<stdio.h>
int main()
{
    long long a,b,c;
    scanf("%ld %ld", &a ,&b);
    c=a/b;
    if (c%2==0){
        printf("NO");
    }
    else{
        printf("YES");
    }
    return 0;
}

 #include <stdio.h>
#include <stdlib.h>

int main()
{
 int n,i,k;
    scanf("%d%d",&n,&k);

     for(i=1;n>=k;i++)
     {
         n=n-k;
     }
     if(i-1%2==0)
        printf("NO");
     else
        printf("YES");
}

#include<stdio.h>
int main()
{
    int n,k,temp=0;
    scanf("%d %d",&n,&k);
    temp=n/k;
    if(temp%2)
    {
        printf("YES");
    }
    else
    {
        printf("NO");
    }
    return 0;
}

int main()
{
    int n,k;
    scanf("%d %d",&n,&k);

    if(n%k==0 && (n/k)%2!=0)
        printf("YES");
    else
        printf("NO");
}

#include<stdio.h>
int main ()
{
    int a,b;
    scanf("%d %d",&a,&b);
    if((a/b)%2==0)
        printf("NO\n");
    else
        printf("YES");
    return 0;
}

#include<stdio.h>
int main()
{
    int n,k;
    scanf("%d%d",&n,&k);
    if(n/k==1){
        printf("yes");
    }
    else{
        printf("no");
    }
    return 0;
}

#include<stdio.h>

int main()
{
  unsigned long long int n,k,s=0,l=0;
  scanf("%l64d %l64d",&n,&k);

  while(n>k || n==k){
      n = n-k;
      s++;
      if(n>k || n==k){
        n = n-k;
        l++;
    }
    if(n<k){
      break;
    }
  }
  if(s>l){
    printf("YES\n");
  }
  else if(s==l || s<l){
    printf("NO\n");
  }

  return 0;
}

#include<stdio.h>

int main()
{
    int n,k,left=0,count=0,sum=0,i;

    scanf("%d %d",&n,&k);

    for(i=0;i<1000;i++)
    {
        sum=k*i;
        if(n<sum)
        {
            break;
        }
    }

    if(n<sum)
    {
        if(i%2==0)
        {
            printf("NO");
        }
        else
        {
            printf("YES");
        }
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,i,k;
    printf("number of sticks: ");
    scanf("%d",&n);
    printf("number to cross out: ");
     scanf("%d",&k);
     //method 1

     for(i=1;n>=k;i++)
     {
         n=n-k;
     }
     if(i-1%2==0)
        printf("no");
     else
        printf("yes");

}

#include <stdio.h>

int main(void)
{
	int n, k;
	scanf("%d %d", &n, &k);
	if ((n / k) & 1)
		puts("YES");
	else
		puts("NO");
	return 0;
}

#include<stdio.h>
#include<string.h>
int main(){
    int a,b;
    scanf("%d %d",&a,&b);
    if(b>a){
        printf("YES\n");
        return 0;
    }
    if((a/b)%2==0){
        printf("NO\n");
    }else printf("YES\n");
    return 0;
}

#include"stdio.h"
int main()
{
    long n,k;
    scanf("%ld %ld",&n,&k);
    if (n==k)   printf("YES");
    else if((n-k)%2==0) printf("NO");
    else   printf("YES");

    return 0;
}

#include<stdio.h>
int main()
{
    int n,k,l;
    scanf("%d %d",&n,&k);
    l=n/k;
    if(l==1)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int n,k,c=0;
    scanf("%d %d",&n,&k);
    while(n>=k)
    {
        n=n-k;
        c++;
    }
    if(c%2!=0)
    {
        printf("YES");
    }
    else
    {
        printf("NO");
    }
}

#include<stdio.h>
long long k,n;
int main()
{
int c;
while(~scanf("%I64d%I64d",&n,&k))
{
c=n/k;
if(c==1||c==0) printf("YES\n");
else printf("NO\n");
}
return 0;
}

#include<stdio.h>
int main()
{
    int n,k,l;
    scanf("%d %d",&n,&k);
    l=n/k;
    if(l%2==1)
    {
        printf("YES\n");
    }
    else
    {
        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int a,b,c;
    scanf("%d %d",&a,&b);
    c=a/b;
    if(a%b>=0 && c%2!=0) printf("YES\n");
    else printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    long long a,b,c;
    scanf("%ld %ld", &a ,&b);
    c=a/b;
    printf("%ld\n",c);
    if (c%2==0){
        printf("NO");
    }
    else{
        printf("YES");
    }
    return 0;
}

#include<stdio.h>

int main()
{
    long long int n,k,left=0,count=0,sum=0,i;

    scanf("%d %d",&n,&k);

    left=n/k;

    if(n%k==0 && left%2==0)
    {
        printf("NO");
    }
    else if(n%k==0 && left%2!=0)
    {
        printf("YES");
    }
    else if(n%k!=0 && left%2==0)
    {
        printf("NO");
    }
    else
    {
        printf("YES");
    }

    return 0;
}

#include<stdio.h>
int main()
{ long long int n,k,t;
	scanf("%d%d",&n,&k);
	t=n/k;
	if(t%2!=0) printf("YES"); else printf("NO");
}

#include <stdio.h>

int main()
{
    unsigned long a,b;
    scanf("%lu %lu", &a, &b);
    if((a/b)%2 == 0)
        printf("NO");
    else
        printf("YES");
    return 0;
}

#include <stdio.h>
int main()
{
	int num,k,c;
	scanf("%d%d",&num,&k);
	c=num/k;
	if(num-(c*k)>0)
	printf("NO\n");
	else
	printf("YES\n");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{

    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
     #endif
    int n,k;scanf("%d %d",&n,&k);
    int i=1;
    while(k*i<=n)
        i++;
    if(i%2!=0)
        printf("NO");
    else printf("YES");
}

#include<stdio.h>
int main()
{
   long int n,k;
   scanf("%ld %ld",&n,&k);
   long int m;
   m=n%k;
   if(m!=0)
   {
     printf("NO");
   }
   else
   {
      if((n/k)%2==0)
      {
         printf("NO");
      }
      else
      {
         printf("YES");
      }
   }
}

#include<stdio.h>
int main()
{
    long long n,k,d;
    while(scanf("%l64d%l64d",&n,&k)!=EOF)
    {
    d=n/k;
    if(d%2==0)
    printf("NO\n");
    else
    printf("YES\n");
    }
    return 0;

}

#include<stdio.h>
int main()
{
    int i,j,k,n;

    scanf("%d%d",&n,&k);

    if((n/k) != 0)
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

#include<stdio.h>
int main()
{
    int n,k,count=0;
    scanf("%d %d",&n,&k);
    while(n>=k)
    {
        n=n-k;
        count++;
    }
    if(count%2==0)
        printf("No");
    else
        printf("Yes");
}

#include<stdio.h>
int main()
{
   int n,k;
   scanf("%d %d",&n,&k);
   int b;
   b=floor((n*1.0)/k);
   if(b%2 ==0)
   {
      printf("NO");
   }
   else
   {
      printf("YES");
   }
   return 0;
}