QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394541#7756. Omniscia Spares NonezhaohaikunAC ✓1ms3732kbC++202.7kb2024-04-20 15:55:242024-04-20 15:55:25

Judging History

你现在查看的是最新测评结果

  • [2024-04-20 15:55:25]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3732kb
  • [2024-04-20 15:55:24]
  • 提交

answer

// MagicDark
#include <bits/stdc++.h>
#define debug cerr << "\033[33m[" << __LINE__ << "]\033[0m "
#define SZ(x) (int) x.size() - 1
#define all(x) x.begin(), x.end()
#define ms(x, y) memset(x, y, sizeof x)
#define F(i, x, y) for (int i = (x); i <= (y); i++)
#define DF(i, x, y) for (int i = (x); i >= (y); i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <typename T> T& chkmax(T& x, T y) {return x = max(x, y);}
template <typename T> T& chkmin(T& x, T y) {return x = min(x, y);}
template <typename T> T& read(T &x) {
	x = 0; int f = 1; char c = getchar();
	for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
	for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
	return x *= f;
}
const int inf = 1e9;
pair <int, int> p[10101];
vector <pair <int, int>> e;
signed main() {
	int n;
	cin >> n;
	if (n <= 4) {
		cout << "Yes\n";
		F(i, 1, n) cout << 0 << ' ' << i << '\n';
		cout << 0;
		return 0;
	}
	if (n <= 6 || (n & 1)) {
		cout << "No\n";
		return 0;
	}
	cout << "Yes\n";
	p[1] = make_pair(0, 1);
	p[2] = make_pair(0, - 1);
	p[3] = make_pair(- 1, 0);
	p[4] = make_pair(1, 0);
	p[5] = make_pair(0, 2);
	p[6] = make_pair(0, - 2);
	p[7] = make_pair(- 2, 0);
	p[8] = make_pair(2, 0);
	e.emplace_back(5, 7);
	e.emplace_back(5, 3);
	e.emplace_back(5, 1);
	e.emplace_back(5, 4);
	e.emplace_back(5, 8);
	e.emplace_back(1, 3);
	e.emplace_back(1, 4);
	e.emplace_back(7, 3);
	e.emplace_back(3, 4);
	e.emplace_back(4, 8);
	e.emplace_back(3, 2);
	e.emplace_back(4, 2);
	e.emplace_back(7, 6);
	e.emplace_back(3, 6);
	e.emplace_back(2, 6);
	e.emplace_back(4, 6);
	e.emplace_back(8, 6);
	int c = 8;
	while (c < n) {
		if (c % 4 == 0) {
			p[c + 1] = make_pair(0, c / 4 + 1);
			p[c + 2] = make_pair(0, - (c / 4 + 1));
			e.emplace_back(c + 1, c - 1);
			e.emplace_back(c + 1, c);
			e.emplace_back(c + 1, c - 3);
			e.emplace_back(c + 2, c - 1);
			e.emplace_back(c + 2, c);
			e.emplace_back(c + 2, c - 2);
		} else {
			p[c + 1] = make_pair(- (c / 4 + 1), 0);
			p[c + 2] = make_pair(c / 4 + 1, 0);
			e.emplace_back(c + 1, c - 1);
			e.emplace_back(c + 1, c);
			e.emplace_back(c + 1, c - 3);
			e.emplace_back(c + 2, c - 1);
			e.emplace_back(c + 2, c);
			e.emplace_back(c + 2, c - 2);
		}
		c += 2;
	}
	if (c % 4 == 0) {
		p[c - 3] = make_pair(c / 4 + 1, inf);
		p[c - 2] = make_pair(c / 4 + 1, - inf);
	} else {
		p[c - 3] = make_pair(- inf, c / 4 + 2);
		p[c - 2] = make_pair(inf, c / 4 + 2);
	}
	e.emplace_back(c - 3, c - 2);
	F(i, 1, n) cout << p[i].first << ' ' << p[i].second << '\n';
	cout << e.size() << '\n';
	for (auto [a, b]: e) cout << a << ' ' << b << '\n';
	return 0;
}
/* why?
*/

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3632kb

input:

3

output:

Yes
0 1
0 2
0 3
0

result:

ok OK, Accepted.

Test #2:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

4

output:

Yes
0 1
0 2
0 3
0 4
0

result:

ok OK, Accepted.

Test #3:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1

output:

Yes
0 1
0

result:

ok OK, Accepted.

Test #4:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

2

output:

Yes
0 1
0 2
0

result:

ok OK, Accepted.

Test #5:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

5

output:

No

result:

ok OK, Accepted.

Test #6:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

6

output:

No

result:

ok OK, Accepted.

Test #7:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

7

output:

No

result:

ok OK, Accepted.

Test #8:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

8

output:

Yes
0 1
0 -1
-1 0
1 0
3 1000000000
3 -1000000000
-2 0
2 0
18
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
5 6

result:

ok OK, Accepted.

Test #9:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

9

output:

No

result:

ok OK, Accepted.

Test #10:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

10

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-1000000000 4
1000000000 4
0 3
0 -3
24
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
7 8

result:

ok OK, Accepted.

Test #11:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

11

output:

No

result:

ok OK, Accepted.

Test #12:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

12

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
4 1000000000
4 -1000000000
-3 0
3 0
30
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
9 10

result:

ok OK, Accepted.

Test #13:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

13

output:

No

result:

ok OK, Accepted.

Test #14:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

14

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-1000000000 5
1000000000 5
0 4
0 -4
36
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
11 12

result:

ok OK, Accepted.

Test #15:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

15

output:

No

result:

ok OK, Accepted.

Test #16:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

16

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
5 1000000000
5 -1000000000
-4 0
4 0
42
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
15 13
15 14
15 11
16 13
16 14
16 12
13 14

result:

ok OK, Accepted.

Test #17:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

17

output:

No

result:

ok OK, Accepted.

Test #18:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

18

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-1000000000 6
1000000000 6
0 5
0 -5
48
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
15 13
15 14
15 11
16 13
16 14
16...

result:

ok OK, Accepted.

Test #19:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

19

output:

No

result:

ok OK, Accepted.

Test #20:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

20

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
6 1000000000
6 -1000000000
-5 0
5 0
54
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
15 13
15 14
15 11
16 13...

result:

ok OK, Accepted.

Test #21:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

21

output:

No

result:

ok OK, Accepted.

Test #22:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

22

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-1000000000 7
1000000000 7
0 6
0 -6
60
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
15 13
15 14
15...

result:

ok OK, Accepted.

Test #23:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

23

output:

No

result:

ok OK, Accepted.

Test #24:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

24

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
7 1000000000
7 -1000000000
-6 0
6 0
66
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14 10
15 13...

result:

ok OK, Accepted.

Test #25:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

25

output:

No

result:

ok OK, Accepted.

Test #26:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

26

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-1000000000 8
1000000000 8
0 7
0 -7
72
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11
14 12
14...

result:

ok OK, Accepted.

Test #27:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

27

output:

No

result:

ok OK, Accepted.

Test #28:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

28

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
8 1000000000
8 -1000000000
-7 0
7 0
78
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
13 9
14 11...

result:

ok OK, Accepted.

Test #29:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

29

output:

No

result:

ok OK, Accepted.

Test #30:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

30

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-1000000000 9
1000000000 9
0 8
0 -8
84
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 11
13 12
1...

result:

ok OK, Accepted.

Test #31:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

31

output:

No

result:

ok OK, Accepted.

Test #32:

score: 0
Accepted
time: 1ms
memory: 3568kb

input:

32

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
9 1000000000
9 -1000000000
-8 0
8 0
90
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 10
12 8
13 1...

result:

ok OK, Accepted.

Test #33:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

33

output:

No

result:

ok OK, Accepted.

Test #34:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

34

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-1000000000 10
1000000000 10
0 9
0 -9
96
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7
12 9
12 1...

result:

ok OK, Accepted.

Test #35:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

35

output:

No

result:

ok OK, Accepted.

Test #36:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

36

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
10 1000000000
10 -1000000000
-9 0
9 0
102
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9
11 10
11 7...

result:

ok OK, Accepted.

Test #37:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

37

output:

No

result:

ok OK, Accepted.

Test #38:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

38

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-1000000000 11
1000000000 11
0 10
0 -10
108
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
10 6
11 9...

result:

ok OK, Accepted.

Test #39:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

39

output:

No

result:

ok OK, Accepted.

Test #40:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

40

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
11 1000000000
11 -1000000000
-10 0
10 0
114
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5
10 7
10 8
...

result:

ok OK, Accepted.

Test #41:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

41

output:

No

result:

ok OK, Accepted.

Test #42:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

42

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-1000000000 12
1000000000 12
0 11
0 -11
120
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
9 7
9 8
9 5...

result:

ok OK, Accepted.

Test #43:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

43

output:

No

result:

ok OK, Accepted.

Test #44:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

44

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
12 1000000000
12 -1000000000
-11 0
11 0
126
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2 6
4 6
8 6
...

result:

ok OK, Accepted.

Test #45:

score: 0
Accepted
time: 1ms
memory: 3528kb

input:

45

output:

No

result:

ok OK, Accepted.

Test #46:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

46

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-1000000000 13
1000000000 13
0 12
0 -12
132
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 2
7 6
3 6
2...

result:

ok OK, Accepted.

Test #47:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

47

output:

No

result:

ok OK, Accepted.

Test #48:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

48

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
13 1000000000
13 -1000000000
-12 0
12 0
138
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4
4 8
3 2
4 ...

result:

ok OK, Accepted.

Test #49:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

49

output:

No

result:

ok OK, Accepted.

Test #50:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

50

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-1000000000 14
1000000000 14
0 13
0 -13
144
5 7
5 3
5 1
5 4
5 8
1 3
1 4
7 3
3 4...

result:

ok OK, Accepted.

Test #51:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

51

output:

No

result:

ok OK, Accepted.

Test #52:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

52

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
14 1000000000
14 -1000000000
-13 0
13 0
150
5 7
5 3
5 1
5 4
5 8
1 3
...

result:

ok OK, Accepted.

Test #53:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

53

output:

No

result:

ok OK, Accepted.

Test #54:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

54

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-1000000000 15
1000000000 15
0 14
0 -14
156
5 7
5 3
5 1
5...

result:

ok OK, Accepted.

Test #55:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

55

output:

No

result:

ok OK, Accepted.

Test #56:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

56

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
15 1000000000
15 -1000000000
-14 0
14 0
162
5 ...

result:

ok OK, Accepted.

Test #57:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

57

output:

No

result:

ok OK, Accepted.

Test #58:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

58

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-1000000000 16
1000000000 16
0 15
0...

result:

ok OK, Accepted.

Test #59:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

59

output:

No

result:

ok OK, Accepted.

Test #60:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

60

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
16 1000000000
16 -100000...

result:

ok OK, Accepted.

Test #61:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

61

output:

No

result:

ok OK, Accepted.

Test #62:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

62

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-1000000000 1...

result:

ok OK, Accepted.

Test #63:

score: 0
Accepted
time: 1ms
memory: 3568kb

input:

63

output:

No

result:

ok OK, Accepted.

Test #64:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

64

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
17...

result:

ok OK, Accepted.

Test #65:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

65

output:

No

result:

ok OK, Accepted.

Test #66:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

66

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #67:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

67

output:

No

result:

ok OK, Accepted.

Test #68:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

68

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #69:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

69

output:

No

result:

ok OK, Accepted.

Test #70:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

70

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #71:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

71

output:

No

result:

ok OK, Accepted.

Test #72:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

72

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #73:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

73

output:

No

result:

ok OK, Accepted.

Test #74:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

74

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #75:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

75

output:

No

result:

ok OK, Accepted.

Test #76:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

76

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #77:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

77

output:

No

result:

ok OK, Accepted.

Test #78:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

78

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #79:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

79

output:

No

result:

ok OK, Accepted.

Test #80:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

80

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #81:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

81

output:

No

result:

ok OK, Accepted.

Test #82:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

82

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #83:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

83

output:

No

result:

ok OK, Accepted.

Test #84:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

84

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #85:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

85

output:

No

result:

ok OK, Accepted.

Test #86:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

86

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #87:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

87

output:

No

result:

ok OK, Accepted.

Test #88:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

88

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #89:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

89

output:

No

result:

ok OK, Accepted.

Test #90:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

90

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #91:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

91

output:

No

result:

ok OK, Accepted.

Test #92:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

92

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #93:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

93

output:

No

result:

ok OK, Accepted.

Test #94:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

94

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #95:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

95

output:

No

result:

ok OK, Accepted.

Test #96:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

96

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #97:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

97

output:

No

result:

ok OK, Accepted.

Test #98:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

98

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Test #99:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

99

output:

No

result:

ok OK, Accepted.

Test #100:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

100

output:

Yes
0 1
0 -1
-1 0
1 0
0 2
0 -2
-2 0
2 0
0 3
0 -3
-3 0
3 0
0 4
0 -4
-4 0
4 0
0 5
0 -5
-5 0
5 0
0 6
0 -6
-6 0
6 0
0 7
0 -7
-7 0
7 0
0 8
0 -8
-8 0
8 0
0 9
0 -9
-9 0
9 0
0 10
0 -10
-10 0
10 0
0 11
0 -11
-11 0
11 0
0 12
0 -12
-12 0
12 0
0 13
0 -13
-13 0
13 0
0 14
0 -14
-14 0
14 0
0 15
0 -15
-15 0
15 0
0 ...

result:

ok OK, Accepted.

Extra Test:

score: 0
Extra Test Passed