QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#259188#7756. Omniscia Spares Nonehos_lyricAC ✓1ms3816kbC++143.7kb2023-11-20 18:13:192023-11-20 18:13:20

Judging History

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

  • [2023-11-20 18:13:20]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3816kb
  • [2023-11-20 18:13:19]
  • 提交

answer

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")


int N, M;
vector<Int> X, Y;
vector<int> A, B;

void ae(int u, int v) {
  ++M;
  A.push_back(u);
  B.push_back(v);
}

int main() {
  for (; ~scanf("%d", &N); ) {
    X.assign(N, 0);
    Y.assign(N, 0);
    M = 0;
    A.clear();
    B.clear();
    if (N <= 4) {
      for (int u = 0; u < N; ++u) {
        X[u] = 0;
        Y[u] = u;
      }
    } else if (N % 2 == 0 && N >= 8) {
      /*
        N=8
           3   
           6   
        -63|36-
           6   
           3   
        
        N=10
           |   
           6   
           6   
        363|363
           6   
           6   
           |   
        
        N=12
            3    
            6    
            6    
        -663|366-
            6    
            6    
            3    
      */
      constexpr int DX[4] = {+1, -1, 0, 0};
      constexpr int DY[4] = {0, 0, +1, -1};
      for (int u = 0; u < N; ++u) {
        X[u] = (u / 4 + 1) * DX[u % 4];
        Y[u] = (u / 4 + 1) * DY[u % 4];
      }
      ae(2, 0);
      ae(2, 1);
      ae(3, 0);
      ae(3, 1);
      ae(2, 3);
      ae(N - 4, N - 3);
      for (int u = 4; u < N; u += 2) {
        ae(u, u - 4);
        ae(u, u - 2);
        ae(u, u - 1);
        ae(u + 1, u - 3);
        ae(u + 1, u - 2);
        ae(u + 1, u - 1);
      }
      const Int big = ((N - 1) / 4 + 1) + 1;
      if (N % 4 != 0) {
        const Int dx = big, dy = big + 1;
        for (int u = 0; u < N; ++u) {
          if (Y[u] > 0) {
            const Int t = Y[u] - 1;
            X[u] = t * dx;
            Y[u] = t * dy + 1;
          }
          if (Y[u] < 0) {
            const Int t = -Y[u] - 1;
            X[u] = t * dx;
            Y[u] = t * -dy - 1;
          }
        }
      } else {
        for (int u = 0; u < N; ++u) {
          Y[u] += big * abs(X[u]);
        }
      }
    } else {
      puts("No");
      continue;
    }
    
    puts("Yes");
    for (int u = 0; u < N; ++u) {
      printf("%lld %lld\n", X[u], Y[u]);
    }
    printf("%d\n", M);
    for (int i = 0; i < M; ++i) {
      printf("%d %d\n", A[i] + 1, B[i] + 1);
    }
#ifdef LOCAL
cerr<<"N = "<<N<<endl;
vector<int>deg(N,0);for(int i=0;i<M;++i){++deg[A[i]];++deg[B[i]];}cerr<<"deg = "<<deg<<endl;
puts("[DOT]");for(int u=0;u<N;++u)printf("%lld %lld\n",X[u],Y[u]);
puts("[LINE_SEGMENT]");for(int i=0;i<M;++i)printf("%lld %lld %lld %lld\n",X[A[i]],Y[A[i]],X[B[i]],Y[B[i]]);
puts("========");
#endif
  }
  return 0;
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3

output:

Yes
0 0
0 1
0 2
0

result:

ok OK, Accepted.

Test #2:

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

input:

4

output:

Yes
0 0
0 1
0 2
0 3
0

result:

ok OK, Accepted.

Test #3:

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

input:

1

output:

Yes
0 0
0

result:

ok OK, Accepted.

Test #4:

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

input:

2

output:

Yes
0 0
0 1
0

result:

ok OK, Accepted.

Test #5:

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

input:

5

output:

No

result:

ok OK, Accepted.

Test #6:

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

input:

6

output:

No

result:

ok OK, Accepted.

Test #7:

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

input:

7

output:

No

result:

ok OK, Accepted.

Test #8:

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

input:

8

output:

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

result:

ok OK, Accepted.

Test #9:

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

input:

9

output:

No

result:

ok OK, Accepted.

Test #10:

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

input:

10

output:

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

result:

ok OK, Accepted.

Test #11:

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

input:

11

output:

No

result:

ok OK, Accepted.

Test #12:

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

input:

12

output:

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

result:

ok OK, Accepted.

Test #13:

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

input:

13

output:

No

result:

ok OK, Accepted.

Test #14:

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

input:

14

output:

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

result:

ok OK, Accepted.

Test #15:

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

input:

15

output:

No

result:

ok OK, Accepted.

Test #16:

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

input:

16

output:

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

result:

ok OK, Accepted.

Test #17:

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

input:

17

output:

No

result:

ok OK, Accepted.

Test #18:

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

input:

18

output:

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

result:

ok OK, Accepted.

Test #19:

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

input:

19

output:

No

result:

ok OK, Accepted.

Test #20:

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

input:

20

output:

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

result:

ok OK, Accepted.

Test #21:

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

input:

21

output:

No

result:

ok OK, Accepted.

Test #22:

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

input:

22

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
7 9
7 -9
3 0
-3 0
14 17
14 -17
4 0
-4 0
21 25
21 -25
5 0
-5 0
28 33
28 -33
6 0
-6 0
60
3 1
3 2
4 1
4 2
3 4
19 20
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13 9
13 11
13 12
14 10
14 11
14 12
15 11
15 13
15...

result:

ok OK, Accepted.

Test #23:

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

input:

23

output:

No

result:

ok OK, Accepted.

Test #24:

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

input:

24

output:

Yes
1 7
-1 7
0 1
0 -1
2 14
-2 14
0 2
0 -2
3 21
-3 21
0 3
0 -3
4 28
-4 28
0 4
0 -4
5 35
-5 35
0 5
0 -5
6 42
-6 42
0 6
0 -6
66
3 1
3 2
4 1
4 2
3 4
21 22
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13 9
13 11
13 12
14 10
14 11
14 12
15 11
1...

result:

ok OK, Accepted.

Test #25:

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

input:

25

output:

No

result:

ok OK, Accepted.

Test #26:

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

input:

26

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
8 10
8 -10
3 0
-3 0
16 19
16 -19
4 0
-4 0
24 28
24 -28
5 0
-5 0
32 37
32 -37
6 0
-6 0
40 46
40 -46
7 0
-7 0
72
3 1
3 2
4 1
4 2
3 4
23 24
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13 9
13 11
13 12
14 10
14...

result:

ok OK, Accepted.

Test #27:

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

input:

27

output:

No

result:

ok OK, Accepted.

Test #28:

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

input:

28

output:

Yes
1 8
-1 8
0 1
0 -1
2 16
-2 16
0 2
0 -2
3 24
-3 24
0 3
0 -3
4 32
-4 32
0 4
0 -4
5 40
-5 40
0 5
0 -5
6 48
-6 48
0 6
0 -6
7 56
-7 56
0 7
0 -7
78
3 1
3 2
4 1
4 2
3 4
25 26
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13 9
13 11
13 12
14 10...

result:

ok OK, Accepted.

Test #29:

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

input:

29

output:

No

result:

ok OK, Accepted.

Test #30:

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

input:

30

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
9 11
9 -11
3 0
-3 0
18 21
18 -21
4 0
-4 0
27 31
27 -31
5 0
-5 0
36 41
36 -41
6 0
-6 0
45 51
45 -51
7 0
-7 0
54 61
54 -61
8 0
-8 0
84
3 1
3 2
4 1
4 2
3 4
27 28
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13 ...

result:

ok OK, Accepted.

Test #31:

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

input:

31

output:

No

result:

ok OK, Accepted.

Test #32:

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

input:

32

output:

Yes
1 9
-1 9
0 1
0 -1
2 18
-2 18
0 2
0 -2
3 27
-3 27
0 3
0 -3
4 36
-4 36
0 4
0 -4
5 45
-5 45
0 5
0 -5
6 54
-6 54
0 6
0 -6
7 63
-7 63
0 7
0 -7
8 72
-8 72
0 8
0 -8
90
3 1
3 2
4 1
4 2
3 4
29 30
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
11 10
12 8
12 9
12 10
13...

result:

ok OK, Accepted.

Test #33:

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

input:

33

output:

No

result:

ok OK, Accepted.

Test #34:

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

input:

34

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
10 12
10 -12
3 0
-3 0
20 23
20 -23
4 0
-4 0
30 34
30 -34
5 0
-5 0
40 45
40 -45
6 0
-6 0
50 56
50 -56
7 0
-7 0
60 67
60 -67
8 0
-8 0
70 78
70 -78
9 0
-9 0
96
3 1
3 2
4 1
4 2
3 4
31 32
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
1...

result:

ok OK, Accepted.

Test #35:

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

input:

35

output:

No

result:

ok OK, Accepted.

Test #36:

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

input:

36

output:

Yes
1 10
-1 10
0 1
0 -1
2 20
-2 20
0 2
0 -2
3 30
-3 30
0 3
0 -3
4 40
-4 40
0 4
0 -4
5 50
-5 50
0 5
0 -5
6 60
-6 60
0 6
0 -6
7 70
-7 70
0 7
0 -7
8 80
-8 80
0 8
0 -8
9 90
-9 90
0 9
0 -9
102
3 1
3 2
4 1
4 2
3 4
33 34
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
10 6
10 7
10 8
11 7
11 9
1...

result:

ok OK, Accepted.

Test #37:

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

input:

37

output:

No

result:

ok OK, Accepted.

Test #38:

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

input:

38

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
11 13
11 -13
3 0
-3 0
22 25
22 -25
4 0
-4 0
33 37
33 -37
5 0
-5 0
44 49
44 -49
6 0
-6 0
55 61
55 -61
7 0
-7 0
66 73
66 -73
8 0
-8 0
77 85
77 -85
9 0
-9 0
88 97
88 -97
10 0
-10 0
108
3 1
3 2
4 1
4 2
3 4
35 36
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
1...

result:

ok OK, Accepted.

Test #39:

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

input:

39

output:

No

result:

ok OK, Accepted.

Test #40:

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

input:

40

output:

Yes
1 11
-1 11
0 1
0 -1
2 22
-2 22
0 2
0 -2
3 33
-3 33
0 3
0 -3
4 44
-4 44
0 4
0 -4
5 55
-5 55
0 5
0 -5
6 66
-6 66
0 6
0 -6
7 77
-7 77
0 7
0 -7
8 88
-8 88
0 8
0 -8
9 99
-9 99
0 9
0 -9
10 110
-10 110
0 10
0 -10
114
3 1
3 2
4 1
4 2
3 4
37 38
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
7 6
8 4
8 5
8 6
9 5
9 7
9 8
...

result:

ok OK, Accepted.

Test #41:

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

input:

41

output:

No

result:

ok OK, Accepted.

Test #42:

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

input:

42

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
12 14
12 -14
3 0
-3 0
24 27
24 -27
4 0
-4 0
36 40
36 -40
5 0
-5 0
48 53
48 -53
6 0
-6 0
60 66
60 -66
7 0
-7 0
72 79
72 -79
8 0
-8 0
84 92
84 -92
9 0
-9 0
96 105
96 -105
10 0
-10 0
108 118
108 -118
11 0
-11 0
120
3 1
3 2
4 1
4 2
3 4
39 40
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5...

result:

ok OK, Accepted.

Test #43:

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

input:

43

output:

No

result:

ok OK, Accepted.

Test #44:

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

input:

44

output:

Yes
1 12
-1 12
0 1
0 -1
2 24
-2 24
0 2
0 -2
3 36
-3 36
0 3
0 -3
4 48
-4 48
0 4
0 -4
5 60
-5 60
0 5
0 -5
6 72
-6 72
0 6
0 -6
7 84
-7 84
0 7
0 -7
8 96
-8 96
0 8
0 -8
9 108
-9 108
0 9
0 -9
10 120
-10 120
0 10
0 -10
11 132
-11 132
0 11
0 -11
126
3 1
3 2
4 1
4 2
3 4
41 42
5 1
5 3
5 4
6 2
6 3
6 4
7 3
7 5
...

result:

ok OK, Accepted.

Test #45:

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

input:

45

output:

No

result:

ok OK, Accepted.

Test #46:

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

input:

46

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
13 15
13 -15
3 0
-3 0
26 29
26 -29
4 0
-4 0
39 43
39 -43
5 0
-5 0
52 57
52 -57
6 0
-6 0
65 71
65 -71
7 0
-7 0
78 85
78 -85
8 0
-8 0
91 99
91 -99
9 0
-9 0
104 113
104 -113
10 0
-10 0
117 127
117 -127
11 0
-11 0
130 141
130 -141
12 0
-12 0
132
3 1
3 2
4 1
4 2
3 4
43 44
5...

result:

ok OK, Accepted.

Test #47:

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

input:

47

output:

No

result:

ok OK, Accepted.

Test #48:

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

input:

48

output:

Yes
1 13
-1 13
0 1
0 -1
2 26
-2 26
0 2
0 -2
3 39
-3 39
0 3
0 -3
4 52
-4 52
0 4
0 -4
5 65
-5 65
0 5
0 -5
6 78
-6 78
0 6
0 -6
7 91
-7 91
0 7
0 -7
8 104
-8 104
0 8
0 -8
9 117
-9 117
0 9
0 -9
10 130
-10 130
0 10
0 -10
11 143
-11 143
0 11
0 -11
12 156
-12 156
0 12
0 -12
138
3 1
3 2
4 1
4 2
3 4
45 46
5 1
...

result:

ok OK, Accepted.

Test #49:

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

input:

49

output:

No

result:

ok OK, Accepted.

Test #50:

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

input:

50

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
14 16
14 -16
3 0
-3 0
28 31
28 -31
4 0
-4 0
42 46
42 -46
5 0
-5 0
56 61
56 -61
6 0
-6 0
70 76
70 -76
7 0
-7 0
84 91
84 -91
8 0
-8 0
98 106
98 -106
9 0
-9 0
112 121
112 -121
10 0
-10 0
126 136
126 -136
11 0
-11 0
140 151
140 -151
12 0
-12 0
154 166
154 -166
13 0
-13 0
1...

result:

ok OK, Accepted.

Test #51:

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

input:

51

output:

No

result:

ok OK, Accepted.

Test #52:

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

input:

52

output:

Yes
1 14
-1 14
0 1
0 -1
2 28
-2 28
0 2
0 -2
3 42
-3 42
0 3
0 -3
4 56
-4 56
0 4
0 -4
5 70
-5 70
0 5
0 -5
6 84
-6 84
0 6
0 -6
7 98
-7 98
0 7
0 -7
8 112
-8 112
0 8
0 -8
9 126
-9 126
0 9
0 -9
10 140
-10 140
0 10
0 -10
11 154
-11 154
0 11
0 -11
12 168
-12 168
0 12
0 -12
13 182
-13 182
0 13
0 -13
150
3 1
...

result:

ok OK, Accepted.

Test #53:

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

input:

53

output:

No

result:

ok OK, Accepted.

Test #54:

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

input:

54

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
15 17
15 -17
3 0
-3 0
30 33
30 -33
4 0
-4 0
45 49
45 -49
5 0
-5 0
60 65
60 -65
6 0
-6 0
75 81
75 -81
7 0
-7 0
90 97
90 -97
8 0
-8 0
105 113
105 -113
9 0
-9 0
120 129
120 -129
10 0
-10 0
135 145
135 -145
11 0
-11 0
150 161
150 -161
12 0
-12 0
165 177
165 -177
13 0
-13 0...

result:

ok OK, Accepted.

Test #55:

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

input:

55

output:

No

result:

ok OK, Accepted.

Test #56:

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

input:

56

output:

Yes
1 15
-1 15
0 1
0 -1
2 30
-2 30
0 2
0 -2
3 45
-3 45
0 3
0 -3
4 60
-4 60
0 4
0 -4
5 75
-5 75
0 5
0 -5
6 90
-6 90
0 6
0 -6
7 105
-7 105
0 7
0 -7
8 120
-8 120
0 8
0 -8
9 135
-9 135
0 9
0 -9
10 150
-10 150
0 10
0 -10
11 165
-11 165
0 11
0 -11
12 180
-12 180
0 12
0 -12
13 195
-13 195
0 13
0 -13
14 210...

result:

ok OK, Accepted.

Test #57:

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

input:

57

output:

No

result:

ok OK, Accepted.

Test #58:

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

input:

58

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
16 18
16 -18
3 0
-3 0
32 35
32 -35
4 0
-4 0
48 52
48 -52
5 0
-5 0
64 69
64 -69
6 0
-6 0
80 86
80 -86
7 0
-7 0
96 103
96 -103
8 0
-8 0
112 120
112 -120
9 0
-9 0
128 137
128 -137
10 0
-10 0
144 154
144 -154
11 0
-11 0
160 171
160 -171
12 0
-12 0
176 188
176 -188
13 0
-13...

result:

ok OK, Accepted.

Test #59:

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

input:

59

output:

No

result:

ok OK, Accepted.

Test #60:

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

input:

60

output:

Yes
1 16
-1 16
0 1
0 -1
2 32
-2 32
0 2
0 -2
3 48
-3 48
0 3
0 -3
4 64
-4 64
0 4
0 -4
5 80
-5 80
0 5
0 -5
6 96
-6 96
0 6
0 -6
7 112
-7 112
0 7
0 -7
8 128
-8 128
0 8
0 -8
9 144
-9 144
0 9
0 -9
10 160
-10 160
0 10
0 -10
11 176
-11 176
0 11
0 -11
12 192
-12 192
0 12
0 -12
13 208
-13 208
0 13
0 -13
14 224...

result:

ok OK, Accepted.

Test #61:

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

input:

61

output:

No

result:

ok OK, Accepted.

Test #62:

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

input:

62

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
17 19
17 -19
3 0
-3 0
34 37
34 -37
4 0
-4 0
51 55
51 -55
5 0
-5 0
68 73
68 -73
6 0
-6 0
85 91
85 -91
7 0
-7 0
102 109
102 -109
8 0
-8 0
119 127
119 -127
9 0
-9 0
136 145
136 -145
10 0
-10 0
153 163
153 -163
11 0
-11 0
170 181
170 -181
12 0
-12 0
187 199
187 -199
13 0
-...

result:

ok OK, Accepted.

Test #63:

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

input:

63

output:

No

result:

ok OK, Accepted.

Test #64:

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

input:

64

output:

Yes
1 17
-1 17
0 1
0 -1
2 34
-2 34
0 2
0 -2
3 51
-3 51
0 3
0 -3
4 68
-4 68
0 4
0 -4
5 85
-5 85
0 5
0 -5
6 102
-6 102
0 6
0 -6
7 119
-7 119
0 7
0 -7
8 136
-8 136
0 8
0 -8
9 153
-9 153
0 9
0 -9
10 170
-10 170
0 10
0 -10
11 187
-11 187
0 11
0 -11
12 204
-12 204
0 12
0 -12
13 221
-13 221
0 13
0 -13
14 2...

result:

ok OK, Accepted.

Test #65:

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

input:

65

output:

No

result:

ok OK, Accepted.

Test #66:

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

input:

66

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
18 20
18 -20
3 0
-3 0
36 39
36 -39
4 0
-4 0
54 58
54 -58
5 0
-5 0
72 77
72 -77
6 0
-6 0
90 96
90 -96
7 0
-7 0
108 115
108 -115
8 0
-8 0
126 134
126 -134
9 0
-9 0
144 153
144 -153
10 0
-10 0
162 172
162 -172
11 0
-11 0
180 191
180 -191
12 0
-12 0
198 210
198 -210
13 0
-...

result:

ok OK, Accepted.

Test #67:

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

input:

67

output:

No

result:

ok OK, Accepted.

Test #68:

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

input:

68

output:

Yes
1 18
-1 18
0 1
0 -1
2 36
-2 36
0 2
0 -2
3 54
-3 54
0 3
0 -3
4 72
-4 72
0 4
0 -4
5 90
-5 90
0 5
0 -5
6 108
-6 108
0 6
0 -6
7 126
-7 126
0 7
0 -7
8 144
-8 144
0 8
0 -8
9 162
-9 162
0 9
0 -9
10 180
-10 180
0 10
0 -10
11 198
-11 198
0 11
0 -11
12 216
-12 216
0 12
0 -12
13 234
-13 234
0 13
0 -13
14 2...

result:

ok OK, Accepted.

Test #69:

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

input:

69

output:

No

result:

ok OK, Accepted.

Test #70:

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

input:

70

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
19 21
19 -21
3 0
-3 0
38 41
38 -41
4 0
-4 0
57 61
57 -61
5 0
-5 0
76 81
76 -81
6 0
-6 0
95 101
95 -101
7 0
-7 0
114 121
114 -121
8 0
-8 0
133 141
133 -141
9 0
-9 0
152 161
152 -161
10 0
-10 0
171 181
171 -181
11 0
-11 0
190 201
190 -201
12 0
-12 0
209 221
209 -221
13 0...

result:

ok OK, Accepted.

Test #71:

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

input:

71

output:

No

result:

ok OK, Accepted.

Test #72:

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

input:

72

output:

Yes
1 19
-1 19
0 1
0 -1
2 38
-2 38
0 2
0 -2
3 57
-3 57
0 3
0 -3
4 76
-4 76
0 4
0 -4
5 95
-5 95
0 5
0 -5
6 114
-6 114
0 6
0 -6
7 133
-7 133
0 7
0 -7
8 152
-8 152
0 8
0 -8
9 171
-9 171
0 9
0 -9
10 190
-10 190
0 10
0 -10
11 209
-11 209
0 11
0 -11
12 228
-12 228
0 12
0 -12
13 247
-13 247
0 13
0 -13
14 2...

result:

ok OK, Accepted.

Test #73:

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

input:

73

output:

No

result:

ok OK, Accepted.

Test #74:

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

input:

74

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
20 22
20 -22
3 0
-3 0
40 43
40 -43
4 0
-4 0
60 64
60 -64
5 0
-5 0
80 85
80 -85
6 0
-6 0
100 106
100 -106
7 0
-7 0
120 127
120 -127
8 0
-8 0
140 148
140 -148
9 0
-9 0
160 169
160 -169
10 0
-10 0
180 190
180 -190
11 0
-11 0
200 211
200 -211
12 0
-12 0
220 232
220 -232
13...

result:

ok OK, Accepted.

Test #75:

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

input:

75

output:

No

result:

ok OK, Accepted.

Test #76:

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

input:

76

output:

Yes
1 20
-1 20
0 1
0 -1
2 40
-2 40
0 2
0 -2
3 60
-3 60
0 3
0 -3
4 80
-4 80
0 4
0 -4
5 100
-5 100
0 5
0 -5
6 120
-6 120
0 6
0 -6
7 140
-7 140
0 7
0 -7
8 160
-8 160
0 8
0 -8
9 180
-9 180
0 9
0 -9
10 200
-10 200
0 10
0 -10
11 220
-11 220
0 11
0 -11
12 240
-12 240
0 12
0 -12
13 260
-13 260
0 13
0 -13
14...

result:

ok OK, Accepted.

Test #77:

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

input:

77

output:

No

result:

ok OK, Accepted.

Test #78:

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

input:

78

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
21 23
21 -23
3 0
-3 0
42 45
42 -45
4 0
-4 0
63 67
63 -67
5 0
-5 0
84 89
84 -89
6 0
-6 0
105 111
105 -111
7 0
-7 0
126 133
126 -133
8 0
-8 0
147 155
147 -155
9 0
-9 0
168 177
168 -177
10 0
-10 0
189 199
189 -199
11 0
-11 0
210 221
210 -221
12 0
-12 0
231 243
231 -243
13...

result:

ok OK, Accepted.

Test #79:

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

input:

79

output:

No

result:

ok OK, Accepted.

Test #80:

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

input:

80

output:

Yes
1 21
-1 21
0 1
0 -1
2 42
-2 42
0 2
0 -2
3 63
-3 63
0 3
0 -3
4 84
-4 84
0 4
0 -4
5 105
-5 105
0 5
0 -5
6 126
-6 126
0 6
0 -6
7 147
-7 147
0 7
0 -7
8 168
-8 168
0 8
0 -8
9 189
-9 189
0 9
0 -9
10 210
-10 210
0 10
0 -10
11 231
-11 231
0 11
0 -11
12 252
-12 252
0 12
0 -12
13 273
-13 273
0 13
0 -13
14...

result:

ok OK, Accepted.

Test #81:

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

input:

81

output:

No

result:

ok OK, Accepted.

Test #82:

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

input:

82

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
22 24
22 -24
3 0
-3 0
44 47
44 -47
4 0
-4 0
66 70
66 -70
5 0
-5 0
88 93
88 -93
6 0
-6 0
110 116
110 -116
7 0
-7 0
132 139
132 -139
8 0
-8 0
154 162
154 -162
9 0
-9 0
176 185
176 -185
10 0
-10 0
198 208
198 -208
11 0
-11 0
220 231
220 -231
12 0
-12 0
242 254
242 -254
13...

result:

ok OK, Accepted.

Test #83:

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

input:

83

output:

No

result:

ok OK, Accepted.

Test #84:

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

input:

84

output:

Yes
1 22
-1 22
0 1
0 -1
2 44
-2 44
0 2
0 -2
3 66
-3 66
0 3
0 -3
4 88
-4 88
0 4
0 -4
5 110
-5 110
0 5
0 -5
6 132
-6 132
0 6
0 -6
7 154
-7 154
0 7
0 -7
8 176
-8 176
0 8
0 -8
9 198
-9 198
0 9
0 -9
10 220
-10 220
0 10
0 -10
11 242
-11 242
0 11
0 -11
12 264
-12 264
0 12
0 -12
13 286
-13 286
0 13
0 -13
14...

result:

ok OK, Accepted.

Test #85:

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

input:

85

output:

No

result:

ok OK, Accepted.

Test #86:

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

input:

86

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
23 25
23 -25
3 0
-3 0
46 49
46 -49
4 0
-4 0
69 73
69 -73
5 0
-5 0
92 97
92 -97
6 0
-6 0
115 121
115 -121
7 0
-7 0
138 145
138 -145
8 0
-8 0
161 169
161 -169
9 0
-9 0
184 193
184 -193
10 0
-10 0
207 217
207 -217
11 0
-11 0
230 241
230 -241
12 0
-12 0
253 265
253 -265
13...

result:

ok OK, Accepted.

Test #87:

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

input:

87

output:

No

result:

ok OK, Accepted.

Test #88:

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

input:

88

output:

Yes
1 23
-1 23
0 1
0 -1
2 46
-2 46
0 2
0 -2
3 69
-3 69
0 3
0 -3
4 92
-4 92
0 4
0 -4
5 115
-5 115
0 5
0 -5
6 138
-6 138
0 6
0 -6
7 161
-7 161
0 7
0 -7
8 184
-8 184
0 8
0 -8
9 207
-9 207
0 9
0 -9
10 230
-10 230
0 10
0 -10
11 253
-11 253
0 11
0 -11
12 276
-12 276
0 12
0 -12
13 299
-13 299
0 13
0 -13
14...

result:

ok OK, Accepted.

Test #89:

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

input:

89

output:

No

result:

ok OK, Accepted.

Test #90:

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

input:

90

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
24 26
24 -26
3 0
-3 0
48 51
48 -51
4 0
-4 0
72 76
72 -76
5 0
-5 0
96 101
96 -101
6 0
-6 0
120 126
120 -126
7 0
-7 0
144 151
144 -151
8 0
-8 0
168 176
168 -176
9 0
-9 0
192 201
192 -201
10 0
-10 0
216 226
216 -226
11 0
-11 0
240 251
240 -251
12 0
-12 0
264 276
264 -276
...

result:

ok OK, Accepted.

Test #91:

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

input:

91

output:

No

result:

ok OK, Accepted.

Test #92:

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

input:

92

output:

Yes
1 24
-1 24
0 1
0 -1
2 48
-2 48
0 2
0 -2
3 72
-3 72
0 3
0 -3
4 96
-4 96
0 4
0 -4
5 120
-5 120
0 5
0 -5
6 144
-6 144
0 6
0 -6
7 168
-7 168
0 7
0 -7
8 192
-8 192
0 8
0 -8
9 216
-9 216
0 9
0 -9
10 240
-10 240
0 10
0 -10
11 264
-11 264
0 11
0 -11
12 288
-12 288
0 12
0 -12
13 312
-13 312
0 13
0 -13
14...

result:

ok OK, Accepted.

Test #93:

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

input:

93

output:

No

result:

ok OK, Accepted.

Test #94:

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

input:

94

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
25 27
25 -27
3 0
-3 0
50 53
50 -53
4 0
-4 0
75 79
75 -79
5 0
-5 0
100 105
100 -105
6 0
-6 0
125 131
125 -131
7 0
-7 0
150 157
150 -157
8 0
-8 0
175 183
175 -183
9 0
-9 0
200 209
200 -209
10 0
-10 0
225 235
225 -235
11 0
-11 0
250 261
250 -261
12 0
-12 0
275 287
275 -28...

result:

ok OK, Accepted.

Test #95:

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

input:

95

output:

No

result:

ok OK, Accepted.

Test #96:

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

input:

96

output:

Yes
1 25
-1 25
0 1
0 -1
2 50
-2 50
0 2
0 -2
3 75
-3 75
0 3
0 -3
4 100
-4 100
0 4
0 -4
5 125
-5 125
0 5
0 -5
6 150
-6 150
0 6
0 -6
7 175
-7 175
0 7
0 -7
8 200
-8 200
0 8
0 -8
9 225
-9 225
0 9
0 -9
10 250
-10 250
0 10
0 -10
11 275
-11 275
0 11
0 -11
12 300
-12 300
0 12
0 -12
13 325
-13 325
0 13
0 -13
...

result:

ok OK, Accepted.

Test #97:

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

input:

97

output:

No

result:

ok OK, Accepted.

Test #98:

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

input:

98

output:

Yes
1 0
-1 0
0 1
0 -1
2 0
-2 0
26 28
26 -28
3 0
-3 0
52 55
52 -55
4 0
-4 0
78 82
78 -82
5 0
-5 0
104 109
104 -109
6 0
-6 0
130 136
130 -136
7 0
-7 0
156 163
156 -163
8 0
-8 0
182 190
182 -190
9 0
-9 0
208 217
208 -217
10 0
-10 0
234 244
234 -244
11 0
-11 0
260 271
260 -271
12 0
-12 0
286 298
286 -29...

result:

ok OK, Accepted.

Test #99:

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

input:

99

output:

No

result:

ok OK, Accepted.

Test #100:

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

input:

100

output:

Yes
1 26
-1 26
0 1
0 -1
2 52
-2 52
0 2
0 -2
3 78
-3 78
0 3
0 -3
4 104
-4 104
0 4
0 -4
5 130
-5 130
0 5
0 -5
6 156
-6 156
0 6
0 -6
7 182
-7 182
0 7
0 -7
8 208
-8 208
0 8
0 -8
9 234
-9 234
0 9
0 -9
10 260
-10 260
0 10
0 -10
11 286
-11 286
0 11
0 -11
12 312
-12 312
0 12
0 -12
13 338
-13 338
0 13
0 -13
...

result:

ok OK, Accepted.

Extra Test:

score: 0
Extra Test Passed