P23452 [AtCoder] [ARC030A] Cycle Graph
普及-
题目描述

Problem Description

There is a cycle graph consisting of $ n(n≧3) $ vertices as shown in the figure below.

This graph is composed of edges connecting vertex $ 1 $ and vertex $ 2 $, vertex $ 2 $ and vertex $ 3 $, ..., vertex $ n-1 $ and vertex $ n $, and vertex $ n $ and vertex $ 1 $.

You want to remove some vertices from this graph to disconnect it, leaving only $ k $ connected components. Before actually starting to remove vertices, determine whether such a removal is possible.

(*) When a vertex is removed, the edges directly connected to that vertex are also removed. Also, you do not have to remove any vertices if it is not necessary.

Input Format

The input is given from the standard input in the following format.

$ n $ $ k $

  • The first line contains an integer $n\ (3\ ≦\ n\ ≦\ 10^5)$, representing the number of vertices in the cycle graph.
  • The second line contains an integer $k\ (1\ ≦\ k\ ≦\ 10^5)$, representing the number of connected components you want to keep.

Output Format

Output YES if it is possible to remove some vertices from the $ n $ vertex cycle graph to leave exactly $ k $ connected components, otherwise output NO. Do not forget to end with a newline.

Sample Input and Output

Sample Input #1

6
2

Sample Output #1

YES

Sample Input #2

3
2

Sample Output #2

NO

Sample Input #3

11
6

Sample Output #3

NO

Sample Input #4

11
5

Sample Output #4

YES

Notes/Hints

Sample Explanation 1

For example, by removing vertex $ 1 $ and vertex $ 3 $ as shown in the figure below, you can leave exactly $ 2 $ connected components. [MATH0]

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
6 2
样例输出
YES