CodeForce 832A Sasha and Sticks
A. Sasha and Sticks
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
It’s one more school day now. Sasha doesn’t like classes and is always bored at them. So, each day he invents some game and plays in it alone or with friends.
Today he invented one simple game to play with Lena, with whom he shares a desk. The rules are simple. Sasha draws n sticks in a row. After that the players take turns crossing out exactly k sticks from left or right in each turn. Sasha moves first, because he is the inventor of the game. If there are less than k sticks on the paper before some turn, the game ends. Sasha wins if he makes strictly more moves than Lena. Sasha wants to know the result of the game before playing, you are to help him.
Input
The first line contains two integers n and k (1 ≤ n, k ≤ 1018, k ≤ n) — the number of sticks drawn by Sasha and the number k — the number of sticks to be crossed out on each turn.
Output
If Sasha wins, print “YES” (without quotes), otherwise print “NO” (without quotes).
You can print each letter in arbitrary case (upper of lower).
Examples
input
1 1
output
YES
input
10 4
output
NO
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <map>
#include <stack>
#include <queue>
using namespace std;
typedef long long int LL;
LL k,n;
int main()
{
scanf("%lld%lld",&k,&n);
LL ans=k/n;
if(ans&1)
printf("YES\n");
else
printf("NO\n");
return 0;
}