codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

922C.md (1503B)


      1 Source: https://codeforces.com/problemset/problem/922/C
      2 
      3 C. Cave Painting
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 Imp is watching a documentary about cave painting.
     22 
     23  ![](https://espresso.codeforces.com/8ec8a9fff94ac26b2c760e63823e96e9e224b87b.png) 
     24 
     25 Some numbers, carved in chaotic order, immediately attracted his attention. Imp rapidly proposed a guess that they are the remainders of division of a number *n* by all integers *i* from 1 to *k*. Unfortunately, there are too many integers to analyze for Imp.
     26 
     27 Imp wants you to check whether all these remainders are distinct. Formally, he wants to check, if all ![](https://espresso.codeforces.com/af9bf37ade74cbe9830bd367f7c2aeaf738ffd73.png), 1 ≤ *i* ≤ *k*, are distinct, i. e. there is no such pair (*i*, *j*) that:
     28 
     29 * 1 ≤ *i* < *j* ≤ *k*,
     30 * ![](https://espresso.codeforces.com/d2e5b79d0b20795f51610e384d5973d0a2a091dd.png), where ![](https://espresso.codeforces.com/cd0226f6733233da1ba1f4844ccc38fcceb2fd37.png) is the remainder of division *x* by *y*.
     31 
     32 Input
     33 
     34 The only line contains two integers *n*, *k* (1 ≤ *n*, *k* ≤ 1018).
     35 
     36 Output
     37 
     38 Print "Yes", if all the remainders are distinct, and "No" otherwise.
     39 
     40 You can print each letter in arbitrary case (lower or upper).
     41 
     42 Examples
     43 
     44 Input
     45 
     46 ```
     47 4 4
     48 ```
     49 
     50 Output
     51 
     52 ```
     53 No
     54 ```
     55 
     56 Input
     57 
     58 ```
     59 5 3
     60 ```
     61 
     62 Output
     63 
     64 ```
     65 Yes
     66 ```
     67 
     68 Note
     69 
     70 In the first sample remainders modulo 1 and 4 coincide.