题号:NC25399
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
yang12138 participated in the ec-final of 8102. Though he was good at number theory, he did not succeed in solving one of the number theory problem. This made him feel very angry. After the contest, he came up with a more difficult (?) number theory problem. He was so mad that he took the problem to this contest. Can you solve it?
There is an integer sequence S(index from 1) of length

, which is composed of :
where
)
represents the Euler function of n.
The definition of the Euler function is given below:
)
=
Number of integers in 1-n which is coprime with n.
The Euler function values of 1,2,...,9,10 are 1,1,2,2,4,2,6,4,6,4
Given a sequence of numbers T(index from 1) with length of 300. He wants to know if this sequence is a contiguous subsequence of S. That is, whether there exists an i such that

. If exists, output the smallest i, otherwise output "yang12138 laji"(without quotes).
输入描述:
The input has 30 lines, ten positive integers per line, representing the sequence T.
输出描述:
If the sequence T is a contiguous subsequence of S, output the smallest position i, otherwise output "yang12138 laji", without quotes.
示例1
输入
复制
1 1 2 2 4 2 6 4 6 4
10 4 12 6 8 8 16 6 18 8
12 10 22 8 20 12 18 12 28 8
30 16 20 16 24 12 36 18 24 16
40 12 42 20 24 22 46 16 42 20
32 24 52 18 40 24 36 28 58 16
60 30 36 32 48 20 66 32 44 24
70 24 72 36 40 36 60 24 78 32
54 40 82 24 64 42 56 40 88 24
72 44 60 46 72 32 96 42 60 40
100 32 102 48 48 52 106 36 108 40
72 48 112 36 88 56 72 58 96 32
110 60 80 60 100 36 126 64 84 48
130 40 108 66 72 64 136 44 138 48
92 70 120 48 112 72 84 72 148 40
150 72 96 60 120 48 156 78 104 64
132 54 162 80 80 82 166 48 156 64
108 84 172 56 120 80 116 88 178 48
180 72 120 88 144 60 160 92 108 72
190 64 192 96 96 84 196 60 198 80
132 100 168 64 160 102 132 96 180 48
210 104 140 106 168 72 180 108 144 80
192 72 222 96 120 112 226 72 228 88
120 112 232 72 184 116 156 96 238 64
240 110 162 120 168 80 216 120 164 100
250 72 220 126 128 128 256 84 216 96
168 130 262 80 208 108 176 132 268 72
270 128 144 136 200 88 276 138 180 96
280 92 282 140 144 120 240 96 272 112
192 144 292 84 232 144 180 148 264 80
示例2
输入
复制
1 1 2 2 4 2 6 4 6 4
10 4 12 6 8 8 16 6 18 8
12 10 22 8 20 12 18 12 28 8
30 16 20 16 24 12 36 18 24 16
40 12 42 20 24 22 46 16 42 20
32 24 52 18 40 24 36 28 58 16
60 30 36 32 48 20 66 32 44 24
70 24 72 36 40 36 60 24 78 32
54 40 82 24 64 42 56 40 88 24
72 44 60 46 72 32 96 42 60 40
100 32 102 48 48 52 106 36 108 40
72 48 112 36 88 55 72 58 96 32
110 60 80 60 100 36 126 64 84 48
130 40 108 66 72 64 136 44 138 48
92 70 120 48 112 72 84 72 148 40
150 72 96 60 120 48 156 78 104 64
132 54 162 80 80 82 166 48 156 64
108 84 172 56 120 80 116 88 178 48
180 72 120 88 144 60 160 92 108 72
190 64 192 96 96 84 196 60 198 80
132 100 168 64 160 102 132 96 180 48
210 104 140 106 168 72 180 108 144 80
192 72 222 96 120 112 226 72 228 88
120 112 232 72 184 116 156 96 238 64
240 110 162 120 168 80 216 120 164 100
250 72 220 126 128 128 256 84 216 96
168 130 262 80 208 108 176 132 268 72
270 128 144 136 200 88 276 138 180 96
280 92 282 140 144 120 240 96 272 112
192 144 292 84 232 144 180 148 264 80