Harryxun/stf_run huggingface dataset:
n, m = [int(i) for i in input().split()]
a = []
broken = [False] * (n+1)
for _ in range(m):
    i = int(input())
    a.append(i)
    broken[i] = True

ways = [0] * 3
ways[1] = 0 if broken[1] else 1
ways[2] = 0 if broken[2] else ways[1] + 1
for i in range(3, n+1):
    if broken[i]:
        ways.append(0)
    else:
        ways.append((ways[-2]+ways[-1])%(10**9+7))

print(ways[n])


### FIXED CODE ###

n, m = [int(i) for i in input().split()]
a = []
broken = [False] * max(n+1, 3)
for _ in range(m):
    i = int(input())
    a.append(i)
    broken[i] = True

ways = [0] * 3
ways[1] = 0 if broken[1] else 1
ways[2] = 0 if broken[2] else ways[1] + 1
for i in range(3, n+1):
    if broken[i]:
        ways.append(0)
    else:
        ways.append((ways[-2]+ways[-1])%(10**9+7))

print(ways[n])
# coding: utf-8
# Your code here!

n=int(input())
a = [list(map(int, input().split())) for _ in range(3)]
a[0].sort()
a[2].sort()
"""
print(a[0])
print(a[1])
print(a[2])
"""
def bin_upper(b):    
    pl=0
    pr=n-1
    
    while True:
        pc=(pl+pr)//2
        if a[0][pc]>=b and a[0][pc-1]<b:
            return pc
        elif a[0][pc]<b:
            pl=pc+1
            if pl>n-1:
                return n
        else:
            pr=pc-1
            if pr<0:
                return 0
                
def bin_lower(b):    
    pl=0
    pr=n-1
    
    while True:
        pc=(pl+pr)//2
        if a[2][pc]<=b and a[2][pc+1]>b:
            return n-1-pc
        elif a[2][pc]>b:
            pr=pc-1
            if pr<0:
                return 0
        else:
            pl=pc+1
            if pl>n-1:
                return n
"""
print(bin_upper(a[1][0]))
print(bin_lower(a[1][0]))
print(bin_upper(a[1][1]))
print(bin_lower(a[1][1]))
print(bin_upper(a[1][2]))
print(bin_lower(a[1][2]))
"""

cnt=0
for i in range(n):
    #val=bin_upper(a[1][0])
    #print(val)
    cnt+=bin_upper(a[1][i])*bin_lower(a[1][i])
print(cnt)



### FIXED CODE ###

import sys
input=sys.stdin.readline
from bisect import bisect_right, bisect_left
n=int(input())
a = [list(map(int, input().split())) for _ in range(3)]
a[0].sort()
a[2].sort()



cnt=0
for i in range(n):
    index_1 = bisect_left(a[0],a[1][i])
    index_2 = n-bisect_right(a[2],a[1][i])
    cnt+=index_1*index_2
print(cnt)
import sys

sys.setrecursionlimit(1000000)
n, k = map(int, input().split())

nCr = {}


def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    print(cmb((n - k + 1), i) * cmb(k - 1, i - 1))


### FIXED CODE ###

import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)
a, b = map(int, input().split())

A = [1, 2, 3]
A.pop(a-1)
A.pop(b-2)
print(A[0])

### FIXED CODE ###

a = int(input())
b = int(input())

A = [1, 2, 3]
A[a-1]= 0
A[b-1] = 0
print(sum(A))
s = list(input().split())
y = sorted(s)

if (y[0] == y[1]) and(y[2]== y[3]):
    print('YES')
else:
    print('NO')

### FIXED CODE ###

y = sorted(list(input()))

if (y[0] == y[1]) and(y[2]== y[3])and(y[0]!=y[2]):
    print('Yes')
else:
    print('No')
import math
A, B, H, M=map(int,input().split())

if (H == 0) & (M == 0):
    print(0)
else:
    ang_m = M * 6
    ang_h = H　* 30 + M * 0.5
    ang = max(ang_h, ang_m) - min(ang_h, ang_m)

    C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
    print(C)

### FIXED CODE ###

import math
A, B, H, M=map(int,input().split())

ang_m = M * 6
ang_h = H * 30 + M * 0.5
ang = max(ang_h, ang_m) - min(ang_h, ang_m)

C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
print(C)
_,a=open(0);print('YNeos'[eval(a.replace(' ','^'))>0::2])

### FIXED CODE ###

_,a=open(0);a,*b=map(int,a.split())
for b in b:a^=b
print('YNeos'[a>0::2])
a,b=map(int,input().split())
c=a-2b
print(c)

### FIXED CODE ###

a,b = map(int,input().split())
c = 2*b
d = a-c
if d > 0:
 print(d)
elif d <= 0:
 print(0)
s = input()
s.reverse()
n = len(s)
dp1 = [0]*n
dp2 = [0]*n
counting = [0]*2019
dp1[0] = 1
dp2[0] = s[0]
counting[dp2[0]] += 1
if n >= 2:
    for i in range(1,n):
        dp1[i] = (10*dp1[i-1]) % 2019
        dp2[i] = (int(s[i])*dp1[i]+dp2[i-1]) % 2019
        counting[dp2[i]] += 1
sm = 0
for j in range(2019):
    sm += counting[j]*(counting[j]-1)
print(sm)

### FIXED CODE ###

s = input()
s = list(reversed(s))
n = len(s)
dp1 = [0]*n
dp2 = [0]*n
counting = [0]*2019
counting[0] += 1
dp1[0] = 1
dp2[0] = int(s[0])
counting[dp2[0]] += 1
if n >= 2:
    for i in range(1,n):
        dp1[i] = (10*dp1[i-1]) % 2019
        dp2[i] = (int(s[i])*dp1[i]+dp2[i-1]) % 2019
        counting[dp2[i]] += 1
#print(counting)
sm = 0
for j in range(2019):
    sm += int(counting[j]*(counting[j]-1)/2)
print(sm)
or i in range(5):
    I=list(map(int,input().split()))
k=int(input())
if max(I)-min(I)<=k:
    print("Yay!")
else:
    print(":(")


### FIXED CODE ###

I=[]
for i in range(5):
    I.append(int(input()))
k=int(input())
if I[4]-I[0]<=k:
    print("Yay!")
else:
    print(":(")
import math

r = raw_input()
l = float(math.pi)*2*r
s =float(math.pi)*r**2 
print'l s' % (r)

### FIXED CODE ###

import math
r = float(raw_input())
l = math.pi*2*r
s = math.pi*r**2
print'%f %f' % (s, l)
n = int(input())
S = set([int(input()) for in range(n)])
print(len(S))

### FIXED CODE ###

n = int(input())
S = set([int(input()) for i in range(n)])
print(len(S))
n=int(input())
s=input()
from collections import Counter
l=Counter()
for j,i in enumerate(s):
    if l[i]==0:
        l[i]=[]
    l[i].append(j)
ans=0
import bisect
import itertools
ll=Counter()
ll["R"]=len(l["R"])
ll["G"]=len(l["G"])
ll["B"]=len(l["B"])
for i,j in itertools.combinations(range(n),2):
    if s[i]!=s[j]:
        c="RGB".replace(s[i],"").replace(s[j],"")
        idx=bisect.bisect_left(l[c],j)
        ans+=ll[c]-idx
        if 2*j-i<n:
            if s[2*j-i]==c:
                ans-=1
print(ans)



### FIXED CODE ###

n=int(input())
s=input()
from collections import Counter
l=Counter()
l["R"]=[]
l["G"]=[]
l["B"]=[]
for j,i in enumerate(s):
    if l[i]==0:
        l[i]=[]
    l[i].append(j)
ans=0
import bisect
import itertools
ll=Counter()
ll["R"]=len(l["R"])
ll["G"]=len(l["G"])
ll["B"]=len(l["B"])
for i,j in itertools.combinations(range(n),2):
    if s[i]!=s[j]:
        c="RGB".replace(s[i],"").replace(s[j],"")
        idx=bisect.bisect_left(l[c],j)
        ans+=ll[c]-idx
        if 2*j-i<n:
            if s[2*j-i]==c:
                ans-=1
print(ans)
l = [*map(int, input().split())]
l.sort()
if l[0] != l[2] and (l[0] == l[1] or l[1] == l[2]):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())
if (a == b and a != c) or (a ==c and a != b) or (b == c and b != a):
    print("Yes")
else:
    print("No")
A,B,N = map(int,input().split())
S = 0
n = N // B
r = N % B
if B > N:
    S = (A*N)//B
else:
    if  r == 0:
        S = (A*(N-1))//B - A * ((N-1)//B))
    elif r == B - 1:
        S = (A*N)//B - A * (N//B)
    else:
        S = (A*(n*B-1))//B - A * ((n*B-1)//B)

print(S)


### FIXED CODE ###

A,B,N = map(int,input().split())
S = 0
n = N // B
r = N % B
if B > N:
    S = (A*N)//B
else:
    if  r == 0:
        S = (A*(N-1))//B - A * ((N-1)//B)
    elif r == B - 1:
        S = (A*N)//B - A * (N//B)
    else:
        S = (A*(n*B-1))//B - A * ((n*B-1)//B)

print(S)
a,b=map(int,input())
if 1<=a<=9 and 1<=b<=9:
    print(a*b)
else:
    print(-1)

### FIXED CODE ###

a,b=map(int,input().split())
if 1<=a<=9 and 1<=b<=9:
    print(a*b)
else:
    print(-1)
#dp educational contest a frog1
n=int(input())
h=list(map(int,input().split()))
dp=[0]*n
for i in range(1,n):
    if i==1:
        dp[i]=abs(h[i]-h[i-1]) #０番目と１番目の差
        else:
            dp[i]=min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
ans=dp[n-1]
print(ans)


### FIXED CODE ###

#dp educational contest a frog1 漸化式
n=int(input())
h=list(map(int,input().split()))
dp=[0]*n
for i in range(1,n):
    if i==1:
        dp[i]=abs(h[i]-h[i-1]) #０番目と１番目の差
    else:
        dp[i]=min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
ans=dp[n-1]
print(ans)
def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)

n=int(input())

a=int(input())
b=int(input())
x=a*b//gcd(a,b)
for i in range(n-2):
    c=int(input())
    x=c*x//gcd(c,x)
print(x)

### FIXED CODE ###

def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)

n=int(input())

x=1
for i in range(n):
    c=int(input())
    x=c*x//gcd(c,x)
print(x)
a,b = input().split()
a = int(a)
b = int(b)
S = a*b
C = 2 * (a+b)

print(S + " " + C)


### FIXED CODE ###

a,b = input().split()
a = int(a)
b = int(b)
S = a*b
C = 2 * (a+b)

print(str(S) + " " + str(C))
import copy
n = int(input())
a = list(map(int, input().split()))
a.sort()
flag = True
if n % 2 == 1:
    if a[0] != 0:
        print(0)
    else:
        ans = [i for i in range(2, n, 2) for j in range(2)]
        ans.insert(0, 0)
        if ans != a:
            print(0)
            flag = False
    if flag:
        print((2**((n - 1) // 2)) % (1e9 + 7))

else:
    ans = [i for i in range(1, n, 2) for j in range(2)]
    if ans != a:
        print(0)
        flag = False
    if flag:
        print((2**(n // 2)) % (1e9 + 7))


### FIXED CODE ###

import copy
n = int(input())
a = list(map(int, input().split()))
a.sort()
flag = True
if n % 2 == 1:
    if a[0] != 0:
        print(0)
    else:
        ans = [i for i in range(2, n, 2) for j in range(2)]
        ans.insert(0, 0)
        if ans != a:
            print(0)
            flag = False
    if flag:
        print((2**((n - 1) // 2)) % (10**9 + 7))

else:
    ans = [i for i in range(1, n, 2) for j in range(2)]
    if ans != a:
        print(0)
        flag = False
    if flag:
        print((2**(n // 2)) % (10**9 + 7))
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10 ** 6)
# import numpy as np

# 入力
N, Q = map(int, input().split())
g = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    g[a].append(b)
    g[b].append(a)
point = [0] * N
for _ in range(Q):
    p, x = map(int, input().split())
    p -= 1
    point[p] += x
ans = [0] * N
# 探索
def dfs(pre, now):
    # ansを更新
    ans[now] = ans[pre] + point[now]
    # 隣接頂点を探索
    for nxt in g[now]:
        if nxt == pre:
            continue
        dfs(now, nxt)
dfs(0, 0)
print(*ans)


### FIXED CODE ###

from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations
import math
import bisect
import numpy as np
from collections import defaultdict, deque
from operator import itemgetter
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
# MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    N, Q = map(int, input().split())
    G = [[] for _ in range(N)]
    for _ in range(N - 1):
        a, b = [int(i) - 1 for i in input().split()]
        G[a].append(b)
        G[b].append(a)
    A = [0] * N  # 頂点数分だけ準備する
    for _ in range(Q):
        p, x = map(int, input().split())
        p -= 1
        A[p] += x
    que = deque([[-1, 0]])
    while que:
        par, vi = que.popleft()
        for vj in G[vi]:
            if vj == par:  # 探索が親の時はスルー
                continue
            A[vj] += A[vi]  # 数値を追加する
            que.append([vi, vj])  # queに(親，子)を追加する
    print(*A)


if __name__ == '__main__':
    main()
x = int(input().rstrip())
y = int(input().rstrip())
print(str(x*y) + " " + str(2*x + 2*y))

### FIXED CODE ###

x = input().split(" ")
print(int(x[0])*int(x[1]), 2*(int(x[0])+int(x[1])))
N, L = map(int, input().split())
A = map(int, list(input() for _ in range(N)))
B = sorted(A)

print(''.join(B))

### FIXED CODE ###

N, L = map(int, input().split())
A = map(str,list(input() for _ in range(N)))
B = sorted(A)

print(''.join(B))
from collections import Counter

n=int(input())
v=list(map(int,input().split()))

even_counter=Counter(v[::2])
odd_counter=Counter(v[1::2])

even_counter_list = sorted(even_counter.items(), key=lambda x:x[1], reverse=True)
odd_counter_list = sorted(odd_counter.items(), key=lambda x:x[1], reverse=True)


if max(even_counter)!=max(odd_counter):
    print(n-even_counter[max(even_counter)]-odd_counter[max(odd_counter)])
else:
    if len(even_counter)!=1 and len(odd_counter)!=1:
        print(min(n-even_counter[even_counter_list[0,1]]-odd_counter[odd_counter_list[1,1]],n-even_counter[even_counter_list[1,1]]-odd_counter[odd_counter_list[0,1]]))
    elif len(even_counter)==1 and len(odd_counter)!=1:
        print(n-even_counter[max(even_counter)]-odd_counter[odd_counter_list[1,1]])
    elif len(even_counter)!=1 and len(odd_counter)==1:
        print(n-even_counter[even_counter_list[1,1]]-odd_counter[max(odd_counter)])
    else:
        print(n//2)


### FIXED CODE ###

from collections import Counter

n=int(input())
v=list(map(int,input().split()))

e=Counter(v[::2]).most_common() + [(0,0)]
o=Counter(v[1::2]).most_common() + [(0,0)]


if e[0][0]!=o[0][0]:
    print(n-e[0][1]-o[0][1])
else:
    print(min(n-e[0][1]-o[1][1],n-e[1][1]-o[0][1]))
H, W = map(int, input().split())
A = [input() for _ in range(H)]

INF = 10 ** 10
B = [[INF for _ in range(W)] for _ in range(W)]

for h in range(H):
  for w in range(W):
    if A[h][w] == "#":
      B[h][w] = 0

for h in range(H):
  for w in range(W):
    if B[h][w] == 0:
      stack = [(h, w)]
      while stack:
        hh, ww = stack.pop()
        if hh != 0:
          if B[hh][ww] + 1 < B[hh - 1][ww]:
            B[hh - 1][ww] = B[hh][ww] + 1
            stack.append((hh - 1, ww))

        if hh != H - 1:
          if B[hh][ww] + 1 < B[hh + 1][ww]:
            B[hh + 1][ww] = B[hh][ww] + 1
            stack.append((hh + 1, ww))


        if ww != 0:
          if B[hh][ww] + 1 < B[hh][ww - 1]:
            B[hh][ww - 1] = B[hh][ww] + 1
            stack.append((hh, ww - 1))

        if ww != W - 1:
          if B[hh][ww] + 1 < B[hh][ww + 1]:
            B[hh][ww + 1] = B[hh][ww] + 1
            stack.append((hh, ww + 1))
answer = 0
for h in range(H):
  for w in range(W):
    answer = max(answer, B[h][w])
print(answer)

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
A = [input() for _ in range(H)]

check = [[-1 for _ in range(W)] for _ in range(H)]
q = deque()
for i in range(H):
  for j in range(W):
    if  A[i][j] == "#":
      check[i][j] = 0
      q.append((i, j))

while q:
  i, j = q.popleft()
  
  if i - 1 >= 0 and check[i - 1][j] == -1:
      check[i - 1][j] = check[i][j] + 1
      q.append((i - 1, j))

  if i + 1 < H and check[i + 1][j] == -1:
      check[i + 1][j] = check[i][j] + 1
      q.append((i + 1, j))

  if j - 1 >= 0 and check[i][j - 1] == -1:
      check[i][j - 1] = check[i][j] + 1
      q.append((i, j - 1))

  if j + 1 < W and check[i][j + 1] == -1:
      check[i][j + 1] = check[i][j] + 1
      q.append((i, j + 1))

answer = -1
for i in range(H):
  answer = max(answer, max(check[i]))
print(answer)
import numpy as np
import pandas as pd


N, M, K = map(int, input().split())
A = [n for n in input().split()]
B = [n for n in input().split()]

A = np.array(A)
B = np.array(B)

A = np.cumsum(A)
B = np.cumsum(B)

A1 = np.zeros((len(A),2))
A1[:,0] = A
A1[:,1] = np.arange(1,len(A)+1)

B1 = np.zeros((len(B),2))
B1[:,0] = B
B1[:,1] = np.arange(1,len(B)+1)

C1 = np.zeros((len(A)*len(B),2))
lenB = len(B)
for i in range(len(A)):
    for j in range(len(B)):
        C1[lenB*i+j,:] = A1[i,:] + B1[j,:]
C1 = pd.DataFrame(C1)
C1 = C1[C1[0] <= K]

print(int(C1[1].max())


### FIXED CODE ###

import numpy as np

N, M, K = map(int, input().split())
A = [0] + list(map(int, input().split()))
B = [0] + list(map(int, input().split()))

A = np.array(A).cumsum()
B = np.array(B).cumsum()

ans = 0
j = M
for i in range(N+1):
    if A[i] > K:
        break
    while B[j] > K - A[i]:
        j -= 1
    ans = max(ans, i+j)
print(ans)
N = int(input())
MOD = 10**9+7
P2 = [1]
for i in range(N):
  P2 += [(P2[-1]*2)%MOD]
pre = [-1]*N
p = -1
end = 0
ans = 1
for i in range(N):
  c = int(input())
  if pre[c]!=-1:
    if p==c:
      continue
    ans += P2[pre[c]]
    end += 1
    pre[c] = end
  else:
    pre[c] = end
  p = c
print(ans)

### FIXED CODE ###

from collections import defaultdict
N = int(input())
MOD = 10**9+7
dp = [0]*(N+1)
dp[0] = 1
dic = defaultdict(int)
p = -1
for i in range(N):
  c = int(input())
  if c==p:
    dp[i+1] = dp[i]
    continue
  dic[c] += dp[i]
  dp[i+1] = dic[c]%MOD
  p = c
#  print(dp)

print(dp[-1]%MOD)
a, b = map(int,input().split())
cnt = 1
while a != 0:
    if cnt//2 = 1:
        if b//2 = 0:
            print('#.'*(b//2))
        else:
            print('#.'(b//2)+'#')
    else:
        if b//2 = 0:
            print('.#'*(b//2))
        else:
            print('.#'(b//2)+'.')
    print()
    a, b = map(int,input().split())


### FIXED CODE ###

a, b = map(int,input().split())
while a != 0:
    cnt = 1
    while cnt <= a:
        if cnt%2 == 1:
            if b%2 == 0:
                print('#.'*(b//2))
            else:
                print('#.'*(b//2)+'#')
        else:
            if b%2 == 0:
                print('.#'*(b//2))
            else:
                print('.#'*(b//2)+'.')
        cnt += 1
    print()
    a, b = map(int,input().split())
#!/usr/bin/env python


def solve():
    n = int(input())
    queries = [tuple(map(int, input().split())) for _ in range(n)]
    m = max(map(lambda x: abs(x[0]) + abs(x[1]), queries))
    a = list(map(lambda x: (abs(x[0]) + abs(x[1])) % 2, queries))
    if len(set(a)) != 1:
        print(-1)
        return
    else:
        print(m)
        print(' '.join(['1'] * m))
        for (x, y) in queries:
            s = ''
            if x > 0:
                s += 'R' * abs(x)
            else:
                s += 'L' * abs(x)
            if y > 0:
                s += 'U' * abs(y)
            else:
                s += 'D' * abs(y)
            s += 'UD' * ((m - len(s)) // 2)
            print(s)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

#!/usr/bin/env python

import math

def query(p, q, ds):
    p_dirs = []
    q_dirs = []
    for d in ds:
        p_dir = 1 if p>0 else -1
        q_dir = 1 if q>0 else -1

        p_dirs.append(p_dir)
        q_dirs.append(q_dir)

        p -= p_dir * d
        q -= q_dir * d

    res = ''
    for pd, qd in zip(p_dirs, q_dirs):
        if pd > 0 and qd > 0:
            res += 'R'
        elif pd > 0 and qd < 0:
            res += 'U'
        elif pd < 0 and qd > 0:
            res += 'D'
        else:
            res += 'L'

    print(res)


def solve():
    n = int(input())
    queries = [tuple(map(int, input().split())) for _ in range(n)]
    m = max(map(lambda x: abs(x[0]) + abs(x[1]), queries))
    a = list(map(lambda x: (abs(x[0]) + abs(x[1])) % 2, queries))
    if len(set(a)) != 1:
        print(-1)
        return
    ps = [t[0]+t[1] for t in queries]
    qs = [t[0]-t[1] for t in queries]

    n_arms = int(math.ceil(math.log2(m)))
    if ps[0] % 2 == 0:
        ds = [2**i for i in reversed(range(n_arms))] + [1]
    else:
        ds = [2**i for i in reversed(range(n_arms))]
    print(len(ds))
    print(' '.join(map(str, ds)))
    for p, q in zip(ps, qs):
        query(p, q, ds)

if __name__ == '__main__':
    solve()
A, B = map(int, input().split())

if A == 2 || B == 2:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

A, B = map(int, input().split())

if A == 2 or B == 2:
  print("No")
else:
  print("Yes")
N=int(input())
v=list(map(int,input().split())).sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])

### FIXED CODE ###

N=int(input())
v=list(map(int,input().split()))
v.sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])
x=int(input())
a=0
b=0
t=0
while a**5<x:
    while b**5<x:
        if a**+b**5==x:
            print(a,-b)
            t=1
            break
        b+=1
    if t==1:
        break
    a+=1
if t==0:
    for i in range(a+1,10**3):
        for j in range(10**3):
            if i**5-j**5==x:
            print(i,j)
            t=1
            break
    if t==1:
        break

### FIXED CODE ###

x=int(input())
ma=200
for i in range(ma):
    for j in range(-ma,ma):
        if (i**5 - j**5) ==x:
            print(i,j)
            exit()
b = [input() for i in range(int(input()))]
r = [input() for i in range(int(input()))]
k = 0
for w in list(set(b)):
  k = max(o, b.count(w) - r.count(w))
print(k)

### FIXED CODE ###

b = [input() for i in range(int(input()))]
r = [input() for i in range(int(input()))]
o = 0
for w in list(set(b)):
  o = max(o, b.count(w) - r.count(w))
  
print(o)
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int sum = 0;
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < N; i++) {
            int s = sc.nextInt();
            sum += s;
            if (s % 10 != 0 && s < min) {
                min = s;
            }
        }

        if (sum % 10 != 0) {
            System.out.println(sum);
        } else {
            sum -= min;
            if (sum < 0) {
                System.out.println(0);
            } else {
                System.out.println(sum);
            }
        }
    }
}


### FIXED CODE ###

n = int(input())
s = [0]*n
for i in range(n):
    s[i] = int(input())

max = sum(s)

if max % 10 == 0:
    s.sort()
    min = 0
    for i in s:
        if i % 10 != 0:
            min = i
            break
    if min == 0:
        print(0)
    else:
        print(max-min)
else:
    print(max)
print(S)

### FIXED CODE ###

s, t = map(str,input().split())
a, b = map(int,input().split())
u = input()
 
if s == u:
	print(a-1, b)
else:
	print(a, b-1)
n= int(input())
a = list(map(int,input().split()))
c = 0

a.sort()[::-1]

for i in range(n):
    c = c + ((-1)**(i%2))*c[i]

print(c)

### FIXED CODE ###

n= int(input())
a = list(map(int,input().split()))
c = 0

a.sort()
a = a[::-1]
for i in range(n):
    c = c + ((-1)**(i%2))*a[i]

print(c)
def resolve():
	k = int(input())
	ans = 0
	for i in range(1, k+1):
		for j in range(1, k + 1):
			for k in range(1, k + 1):
				ans += reduce(math.gcd, [i, j, k])
	print(ans)

resolve()

### FIXED CODE ###

def resolve():
	w = input()
	if w.find("7") > -1:
		print("Yes")
	else:
		print("No")
resolve()
import numpy as np

k, n = map(int, input().split())
a_array = list(map(int, input().split()))

a_array.append(k + a_array[0])

a_diff = np.diff(a_array)
ans = np.sum(a_diff) - np.max(a_diff)
print(ans)

### FIXED CODE ###

import numpy as np

k, n = map(int, input().split())
a_array = list(map(int, input().split()))

a_array.append(k + a_array[0])

a_diff = np.diff(a_array)
ans = np.sum(a_diff) - np.max(a_diff)
print(ans)
N = input()
N = N /2
print(N)

### FIXED CODE ###

N = input()
N = int(N) //2 + int(N)%2
print(N)