cf/mirror

Yet Another Ball Problem

CF
1118E1700· expert3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 3
Output
YES
3 1
1 3
3 2
2 3
Sample 2of 3
Input
10 4
Output
YES
2 1
1 3
4 2
3 4
4 3
3 2
2 4
4 1
1 4
3 1
Sample 3of 3
Input
13 4
Output
NO
1118E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)