#include <iostream>
#include <cstdlib>
#include <cstdio>
using namespace std;
int k, p;
/*
int myget(int x, int y)
{
int sum = 1;
for (int i = 0; i < y; ++i) {
sum *= x;
}
return sum;
}
void Panduan(int p)
{
for (int k = 1; k <= 10; ++k) {
int sum = 0;
for (int i = 1; i < p; ++i) {
sum += myget(i, k);
}
printf("%d ", sum%p);
}
}
*/
int main()
{
/*
while (cin >> p) {
Panduan(p);
cout << endl;
}
*/
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
while (~scanf("%d %d", &k, &p)) {
int tep = k / (p - 1);
if (0 == tep % 2) {
printf("NO\n");
}
else {
printf("YES\n");
}
}
return 0;
}