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
Note

In the first example Sasha crosses out 1 stick, and then there are no sticks. So Lena can't make a move, and Sasha wins.

In the second example Sasha crosses out 4 sticks, then Lena crosses out 4 sticks, and after that there are only 2 sticks left. Sasha can't make a move. The players make equal number of moves, so Sasha doesn't win.

 #include <iostream>
#include <stdio.h>
#include <cstring>
#include <algorithm>
using namespace std;
#define ll long long
int main()
{
ll n,k;
while(cin>>n>>k){
ll a=n/k;
if(a%==) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
return ;
}

Codeforces 832A. Sasha and Sticks的更多相关文章

  1. CodeForce 832A Sasha and Sticks

    A. Sasha and Sticks time limit per test2 seconds memory limit per test256 megabytes inputstandard in ...

  2. Codeforces 1109D. Sasha and Interesting Fact from Graph Theory

    Codeforces 1109D. Sasha and Interesting Fact from Graph Theory 解题思路: 这题我根本不会做,是周指导带飞我. 首先对于当前已经有 \(m ...

  3. Codeforces Round #425 (Div. 2) Problem A Sasha and Sticks (Codeforces 832A)

    It's one more school day now. Sasha doesn't like classes and is always bored at them. So, each day h ...

  4. 【Codeforces Round #425 (Div. 2) A】Sasha and Sticks

    [Link]: [Description] [Solution] 傻逼题; 获取n/k; 对n/k的奇偶性讨论一下就好 [NumberOf WA] 0 [Reviw] [Code] #include ...

  5. Codeforces #317 C.Lengthening Sticks(数学)

    C. Lengthening Sticks time limit per test 1 second memory limit per test 256 megabytes input standar ...

  6. Codeforces 1109D Sasha and Interesting Fact from Graph Theory (看题解) 组合数学

    Sasha and Interesting Fact from Graph Theory n 个 点形成 m 个有标号森林的方案数为 F(n, m) = m * n ^ {n - 1 - m} 然后就 ...

  7. [CodeForces 471A] MUH and Sticks

    题目链接:http://codeforces.com/problemset/problem/471/A 题目数据规模1 - 9,可以用一个数组进行计数,减掉出现四次的数,看看还有几个是非零数,有一个就 ...

  8. codeforces 572 C. Lengthening Sticks(数学)

    题目链接:http://codeforces.com/contest/572/problem/C 题意:给出a,b,c,l要求a+x,b+y,c+z构成三角形,x+y+z<=l,成立的x,y,z ...

  9. Codeforces 1109F - Sasha and Algorithm of Silence's Sounds(LCT)

    Codeforces 题面传送门 & 洛谷题面传送门 讲个笑话,这题是 2020.10.13 dxm 讲题时的一道例题,而我刚好在一年后的今天,也就是 2021.10.13 学 LCT 时做到 ...

随机推荐

  1. jquery二级导航

    效果图 直接放代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  2. 《自拍教程25》在Linux上配置环境变量

    我们说的环境变量,一般是指的是PATH环境变量, Linux我们用Ubuntu操作系统来举例. 我们从官网下载了Sublime Text的Linux已编译好的包. https://download.s ...

  3. 小白的linux笔记7:批量运行复杂的linux命令组合——BASH简单使用法

    linux的BASH就相当于windows下的BAT文件,可以批处理命令.比如写好一个python脚本后,需要在运行时候加参数,但这个参数又不想每次输入,就可以用BASH的方式写好整条命令,然后直接运 ...

  4. 就不能换DB吗? 抽象工厂模式

    15.1 就不能换DB吗? 15.2 最基本的数据访问程序 namespace 抽象工厂模式 { class Program { static void Main(string[] args) { U ...

  5. linux cpp (接口与实现的分离)

    以下是 .h 文件,是接口. 以下是函数的实现 以下是主函数 首先是以上两个文件编译,不用编译头文件 g++ -c gradeBook.cpp g++ -c gradeBook.main.cpp 之后 ...

  6. linux bash 用户输入yes or no.

    脚本为script2 vim 打开脚本 内容是 对用户的键盘输入反应 sh 运行脚本,一次输入的是y ,一次输入的是n.

  7. git 流程

    1.git clone 拉取代码2.git checkout -b '分支名称' 命令意思: 创建并切换到当前新建的本地分支. 查看并创建分支,先远端,后本地.3.将本地分支和远端分之关联 git b ...

  8. Spring Boot源码(六):Bean的创建详解

    继续之前的项目: People加上无参构造方法: @Component public class People { // private User user; public People(){ Sys ...

  9. PHP0001:PHP环境搭建

    1,本机域名解析 网站域名访问流程 配置阿帕奇服务器 的 路径 阿帕奇中添加 PHP 支持 一个简单的PHP 代码 检测PHP apache 语法   httpd -t apache 的启动 获取网站 ...

  10. MySQL 8 批处理模式

    shell> mysql -h host -u user -p < batch-file 强制执行脚本,即使某些语句参数错误,可以添加 --force 参数 如果MySQL运行在Windo ...