Harryxun/stf_run huggingface dataset:
first_line = input().split()
second_line = input().split()
third_line = input().split()
 
first_line = [int(i) for i in first_line]
second_line = [int(i) for i in second_line]
third_line = [int(i) for i in third_line]

N = input()
N = int(N)



B = []
for i in range(N):
    inp  =input()
    inp = int(inp)
    B.append(inp)



for i in range(3):
    arr[0][i]= first_line[i]
for i in range(3):
    arr[0][i]= second_line[i]
for i in range(3):
    arr[0][i]= third_line[i]

carr = [[False]*3]*3
for b in B:
    for i in range(3):
        for j  in range(3):
            if b == arr[i][j]:
                carr[i][j] = True


def yoko(carr):
    for i in range(3):
        for j in range(3):
            if carr[i][j] != True:
                break
        return  True
    
    return False


def tate(carr):
    for i in range(3):
        for j in range(3):
            if carr[j][i] != True:
                break
        return  True
    
    return False

def naname (carr):
    for i in range(3):
        if carr[i] != True:
            for j in range(3):
                if carr[3-j-1] != True:
                    return False
            return True    
    return True


def checker(carr):
    if not tate  and not yoko and not naname:
        return 'No'
    else:
        return 'Yes' 



print(checker(carr))

### FIXED CODE ###

first_line = input().split()
second_line = input().split()
third_line = input().split()
 
first_line = [int(i) for i in first_line]
second_line = [int(i) for i in second_line]
third_line = [int(i) for i in third_line]

N = input()
N = int(N)



B  = [] 
for i in range(N):
    inp  =input()
    inp = int(inp)
    B.append(inp)


# arr = [[0]*3]*3
# print(arr)
# for i in range(3):
#     arr[0][i]= first_line[i]
#     print(arr)
# print(arr)
# for i in range(3):
#     arr[1][i]= second_line[i]
# for i in range(3):
#     arr[2][i]= third_line[i]

arr = []
arr.append(first_line)
arr.append(second_line)
arr.append(third_line)
carr = [[False for i in range(3)] for j in range(3)]

for b in B:
    for i in range(3):
        for j  in range(3):
            if b == arr[i][j]:
                carr[i][j] = True

def yoko(carr):
    for i in range(3):
        flag = 0
        for j in range(3):
            if carr[i][j] != True:
                flag = 1
        if flag == 0 :
            return True    
    return False


def tate(carr):
    for i in range(3):
        flag = 0
        for j in range(3):
            if carr[j][i] != True:
                flag = 1
                break
        if flag == 0:

            return  True
    
    return False

def naname (carr):
    flag2 = 0
    flag1 = 0
    for i in range(3):
        if carr[i][i] != True:
            flag1 = 1

        if carr[i][3-i-1] != True:
            flag2 = 1;
    if flag1==0 or flag2 ==0:
        return True
    else:
        return False

def checker(carr):
    # print(tate(carr))
    # print(yoko(carr))
    # print(naname(carr))
    
    if not tate(carr)  and not yoko(carr) and not naname(carr):
        return 'No'
    else:
        return 'Yes' 
print(checker(carr))
N = int(input())
total = 0
for i in range(N):
    money, tani = map(input().split())
    money = int(input())
    if tani = "JPY":
        total += money
    else:
        total += money * 380000
print("%d"%(total))


### FIXED CODE ###

y=0
for _ in range(int(input())):
    x,u=input().split()
    y+=int(x) if u=="JPY" else float(x)*380000
print(y)
def shakutori(a,M):
  left =0
  right = 0
  su = 0
  ans = 0
  for i in range(len(a)):
    su +=a[right]
    right +=1
    if su%M==0:
      ans+=1
      while su%M!=0:
        su -=a[left]
        left+=1
  return ans
from itertools import accumulate
N,M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
A = list(accumulate(A))
A = list(map(lambda x: x%M,A))
ans = {}
ans1=0
for i in range(N):
  if A[i] in ans:
    ans[A[i]] +=1
  else:
    ans[A[i]] =1
  ans1 += ans[A[i]]-1
ans1 += ans[0]
print(ans1)

### FIXED CODE ###

def shakutori(a,M):
  left =0
  right = 0
  su = 0
  ans = 0
  for i in range(len(a)):
    su +=a[right]
    right +=1
    if su%M==0:
      ans+=1
      while su%M!=0:
        su -=a[left]
        left+=1
  return ans
from itertools import accumulate
N,M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
A = list(accumulate(A))
A = list(map(lambda x: x%M,A))
ans = {}
ans1=0
for i in range(N):
  if A[i] in ans:
    ans[A[i]] +=1
  else:
    ans[A[i]] =1
  ans1 += ans[A[i]]-1
if 0 in ans:
  ans1 += ans[0]
print(ans1)
N, X = map(int, input().split())
m=[int(input() for i in range(N)]
print(N+(X-sum(m))//min(m))       

### FIXED CODE ###

N, X = map(int, input().split())
m=[int(input()) for i in range(N)]
print(N+(X-sum(m))//min(m))
s = input()
if s[:7] == 'keyence':
    print('YES')
    exit()
if s[-7:] == 'keyence':
    print('YES')
    exit()
for i in range(n):
    if s[:i] + s[-(7-i):] == 'keyence':
        print('YES')
        exit()
print('NO')

### FIXED CODE ###

s = input()
if s[:7] == 'keyence':
    print('YES')
    exit()
if s[-7:] == 'keyence':
    print('YES')
    exit()
for i in range(len(s)):
    if s[:i] + s[-(7-i):] == 'keyence':
        print('YES')
        exit()
print('NO')
s = input()replace('dreamer', '').replace('eraser', '').replace('dream', '').replace('erase', '').
print('YES' if s=='' else 'NO')

### FIXED CODE ###

s = input().replace('eraser', '').replace('erase', '').replace('dreamer', '').replace('dream', '')
print('YES' if s=='' else 'NO')
# -*- coding: utf-8 -*-
from sys import stdin

# import numpy as np
from itertools import accumulate
from bisect import bisect_right

# import sys
# sys.setrecursionlimit(10**4)


def _li():
    return list(map(int, stdin.readline().split()))


def _li_():
    return list(map(lambda x: int(x) - 1, stdin.readline().split()))


def _lf():
    return list(map(float, stdin.readline().split()))


def _ls():
    return stdin.readline().split()


def _i():
    return int(stdin.readline())


def _f():
    return float(stdin.readline())


def _s():
    return stdin.readline()[:-1]


def search(cum1, cum2, iter_max, limit):
    ans = 0
    for i in range(iter_max):
        if cum1[i] > limit:
            break
        cand = bisect_right(cum2, limit - cum1[i])
        ans = max(i + 1 + cand, ans)
    return ans


N, M, K = _li()
A_list = _li()
B_list = _li()

cum_a = list(accumulate(A_list))
cum_b = list(accumulate(B_list))

if cum_a[0] < cum_b[0]:
    print(search(cum_a, cum_b, N))
else:
    print(search(cum_b, cum_a, M))


### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin

# import numpy as np
from itertools import accumulate
from bisect import bisect_right

# import sys
# sys.setrecursionlimit(10**4)


def _li():
    return list(map(int, stdin.readline().split()))


def _li_():
    return list(map(lambda x: int(x) - 1, stdin.readline().split()))


def _lf():
    return list(map(float, stdin.readline().split()))


def _ls():
    return stdin.readline().split()


def _i():
    return int(stdin.readline())


def _f():
    return float(stdin.readline())


def _s():
    return stdin.readline()[:-1]


def search(cum1, cum2, iter_max, limit):
    ans = 0
    for (i,) in range(iter_max):
        if cum1[i] > limit:
            cur = 0
        else:
            cur = i
        cand = bisect_right(cum2, limit - cum1[i])
        ans = max(cur + cand, ans)
    return ans


N, M, K = _li()
A_list = _li()
B_list = _li()

cum_a = [0] + list(accumulate(A_list))
cum_b = list(accumulate(B_list))

ans = 0
for i, a in enumerate(cum_a):
    if a > K:
        cur = 0
    else:
        cur = i
    cand = bisect_right(cum_b, K - a)
    ans = max(cur + cand, ans)

print(ans)
s=input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3] or s[3]==s[4]:
    print("good")
else:
    print("bad")

### FIXED CODE ###

s=input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print("Bad")
else:
    print("Good")
mport sys
import numpy as np
import math
import collections
import copy
import decimal
import itertools
from collections import deque 
from functools import reduce
from itertools import product
from itertools import combinations

# input = sys.stdin.readline
N = int(input())
An = list(map(int, input().split()))
An_l = list(itertools.accumulate(An))
An_l.insert(0, 0)
ans = 0
for i, A in enumerate(An):
    tt = An_l[-1] - An_l[i+1]
#     print(i, An_l[-1], An_l[i], tt)
    At = A * tt
#     print(A, tt, At)
    ans = (ans+At) % (10**9+7)
#     print(ans)
print(ans)



### FIXED CODE ###

N = int(input())
An = list(map(int, input().split()))
tt = sum(An)
total = tt
ans = 0
for A in An:
    At = A * (total-A)
#     if v == 1:
#         At = A * (tt-A)
#     else:
#         At = A * (tt-A*v)*v
#     print(A, total, At, ans)
#     md = At % (10**9+7)
    ans = (ans+At) % (10**9+7)
    total -= A
#     print(ans)
print(ans)
N = int(input())
K = int(input())

L = list(map(int, list(str(N))))

M = len(L)
if L < M:
  x = 1 / 0
DP = [[[0] * 2 for _ in range(K + 1)] for _ in range(M)]

DP[0][1] = [L[0] - 1, 1]
DP[0][0][0] = 1

for i in range(1, M):
  DP[i][0][0] = DP[i - 1][0][0]
  for j in range(1, K + 1):
    DP[i][j][0] = DP[i - 1][j][0]
    DP[i][j][0] += DP[i - 1][j - 1][0] * 9
    DP[i][j][0] += DP[i - 1][j - 1][1] * (L[i] - 1)
    DP[i][j][0] += DP[i - 1][j][1] 
    DP[i][j][1] = DP[i - 1][j - 1][1]

ans = DP[-1][-1][0] + DP[-1][-1][1]
ans = max(0, ans)
print(ans)


### FIXED CODE ###

N = int(input())
K = int(input())

L = list(map(int, list(str(N))))
M = len(L)
DP = [[[0] * 2 for _ in range(K + 1)] for _ in range(M)]

DP[0][1] = [L[0] - 1, 1]
DP[0][0][0] = 1

for i in range(1, M):
  DP[i][0][0] = DP[i - 1][0][0]
  for j in range(1, K + 1):
    if L[i] != 0:
      DP[i][j][0] = DP[i - 1][j][0]
      DP[i][j][0] += DP[i - 1][j][1]
      DP[i][j][0] += DP[i - 1][j - 1][0] * 9
      DP[i][j][0] += DP[i - 1][j - 1][1] * (L[i] - 1)
      DP[i][j][1] = DP[i - 1][j - 1][1]
    else:
      DP[i][j][0] = DP[i - 1][j][0]
      DP[i][j][0] += DP[i - 1][j - 1][0] * 9
      DP[i][j][1] = DP[i - 1][j][1]

ans = DP[-1][-1][0] + DP[-1][-1][1]
ans = max(0, ans)
print(ans)
A,B,C=[int(s) for s in input().split()]
if A==B=C:
    print("No")
elif A!=B!=C:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

A,B,C=[int(s) for s in input().split()]
if A==B==C:
    print("No")
elif A!=B and B!=C and A!=C:
    print("No")
else:
    print("Yes")
n, q = map(int, input().split())

class Node:
    def __init__(self, root):
        self.root = root
        self.children = []
        self.val = 0

    def add_child(self, child_node):
        self.children.append(child_node)
        if self.root is not None:
            self.root.add_child(child_node)

nodes = {
    1: Node(None)
}

for i in range(1, n):
    a, b = map(int, input().split())
    a_node = nodes[a]
    if b not in nodes:
        b_node = Node(a_node)
        nodes[b] = b_node
    a_node.add_child(nodes[b])

for j in range(q):
    p, x = map(int, input().split())
    node = nodes[p]
    node.val += x
    children = node.children
    for child in children:
        child.val += x


arr = [None] * n
for k, v in nodes.items():
    arr[int(k) - 1] = v

res = []
for item in arr:
    res.append(item.val)
print(" ".join(list(map(str, res))))

### FIXED CODE ###

n, q = map(int, input().split())

children_map = [None] * n
vals = [0] * n

for i in range(1, n):
    a, b = map(int, input().split())
    children_map[b - 1] = a - 1

for j in range(q):
    p, x = map(int, input().split())
    vals[p - 1] += x

res = []
for i in range(n):
    parent = children_map[i]
    if parent is not None:
        vals[i] += vals[parent]
    res.append(str(vals[i]))

print(" ".join(res))
import math
N = int(input())
sqN = int(math.sqrt(N))
for i in range(sqN):
  if N % (sqN-i) == 0:
    print(int(N/(sqN-i)+sqN-i))
    break

### FIXED CODE ###

a,b = map(int, input().split())
if a <= 9 and b <= 9:
  print(a*b)
else:
  print(-1)
N = int(input())
words = []
l = []
for i in range(N):
  a = input()
  if i == 0:
    l.append(a)
    b = list(a)
    words.append(b[len(b)-1])
  elif a not in l and i>0:
    b = list(a)
    if i == N-1:
      words.append(b[0])
    else:
      words.append(b[0])
      words.append(b[len(b)-1])
    l.append(a)
  elif a in l and i>0:
    print("No")
    exit(1)

    
for h in range(0,len(l)-2,2):
  if l[h] == l[h+1]:
    flag = True
if all(l):
  print("Yes")
else:
  print("No")
  
  


### FIXED CODE ###

N = int(input())
words = []
l = []
for i in range(N):
    a = input()
    if i == 0:
        l.append(a)
        b = list(a)
        words.append(b[len(b)-1])
    elif i > 0:
        b = list(a)
        if i == N-1:
            words.append(b[0])
        else:
            words.append(b[0])
            words.append(b[len(b)-1])
        l.append(a)

if len(set(l)) != len(l):
    print("No")
    exit()

for h in range(0,len(words),2):
    if words[h] != words[h+1]:
        print("No")
        exit()
print("Yes")
import sympy

N = int(input())

ans = 0

for i in range(1, N+1):
    if i % 2 == 1 and sympy.divisor_count(i) == 8:
        ans += 1

print(ans)

### FIXED CODE ###

import math

N = int(input())

ans = 0

def cal(n):
    limit = math.floor(math.sqrt(n))
    count = 0
    for i in range(1, limit+1):
        if n % i == 0:
            if n % i == i:
                count += 1
            else:
                count += 2
    return count

for i in range(1, N+1, 2):
    if cal(i) == 8:
        ans += 1

print(ans)
from collections import Counter
import sys
N = int(input())
A = [int(_) for _ in input().split()]

key_val_lis = []
for key, value in Counter(A).items():
    if value >= 2:
        key_val_lis.append((key, value))

ans_lis = sorted(key_val_lis, key=lambda x: -x[0])

if ans_lis[0] is None:
    print(0)
    sys.exit()

if ans_lis[1] is not None:
    area_1 = ans_lis[0][0] * ans_lis[1][0]
    area_2 = 0
    if ans_lis[0][1] >= 4:
        area_2 = ans_lis[0][0] ** 2
    print(max(area_1, area_2))
else:
    print(0)

### FIXED CODE ###

from collections import Counter
import sys
N = int(input())
A = [int(_) for _ in input().split()]

key_val_lis = []
for key, value in Counter(A).items():
    if value >= 2:
        key_val_lis.append((key, value))

ans_lis = sorted(key_val_lis, key=lambda x: -x[0])

if len(ans_lis) <= 1 or ans_lis[0][1] is None:
        print(0)
        sys.exit()

area_1 = ans_lis[0][0] * ans_lis[1][0]
area_2 = 0
if ans_lis[0][1] >= 4:
    area_2 = ans_lis[0][0] ** 2
print(max(area_1, area_2))
N,L = map(str,input().split())

words = list()
for i in range(N):
  words.append(input())
  
words.sort()

print(*words,sep ="")


### FIXED CODE ###

N,L = map(int,input().split())

words = list()
for i in range(N):
  words.append(input())
  
words.sort()

print(*words,sep ="")
import itertools

n = int(input())
p = input().replace(" ", "")
q = input().replace(" ", "")
m = ""
for i in range(1, n + 1):
    m += str(i)
anagram_list = ["".join(v) for v in itertools.permutations(m)]

pa = 0
qa = 0

for i in range(len(anagram_list)):
    if anagram_list[i] == p:
        pa = i+1
    if anagram_list[i] == q:
        qa = i+1a
print(abs(pa-qa))


### FIXED CODE ###

import itertools

n = int(input())
p = input().replace(" ", "")
q = input().replace(" ", "")
m = ""
for i in range(1, n + 1):
    m += str(i)
anagram_list = ["".join(v) for v in itertools.permutations(m)]

pa = 0
qa = 0

for i in range(len(anagram_list)):
    if anagram_list[i] == p:
        pa = i+1
    if anagram_list[i] == q:
        qa = i+1
print(abs(pa-qa))
from math import log2, floor
from operator import or_
from functools import reduce
import numpy as np

if True :
    n = int(input())
    a = list(map(int, input().split()))
else :
    n = 10**5
    a = list(np.random.randint(0, 10**9, n))

bl = [0 for _ in range(floor(log2(max(a)))+1)]
for ai in a :
    aj = ai
    for i in range(floor(log2(ai))+1) :
        if aj & 1 == 1 :
            bl[i] += 1
        aj >>= 1

ans = reduce(or_, map(lambda x : x&1, bl))
if ans :
    print("No")
else :
    print("Yes")

### FIXED CODE ###

from math import log2, floor
from operator import or_
from functools import reduce

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

if max(a) == 0 :
    bl = [0]
else :
    bl = [0 for _ in range(floor(log2(max(a)))+1)]
for ai in a :
    aj = ai
    if ai == 0 :
        pass
    else :
        for i in range(floor(log2(ai))+1) :
            if aj & 1 == 1 :
                bl[i] += 1
            aj >>= 1

ans = reduce(or_, map(lambda x : x&1, bl))
if ans :
    print("No")
else :
    print("Yes")
N, K = map(int, input().split())
A, B, a = [0] * N, [0] * N, [''] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())
    a[i] = str(bin(A[i])[2:]).rjust(30, '0')
k = str(bin(K)[2:]).rjust(30, '0')

ans = 0

s = k.index('1')
for r in range(s, 30 + 1):
    tmp = 0
    for i in range(N):
        affordable = True
        for j in range(r):
            if k[j] == '0' and a[i][j] == '1':
                affordable = False
        if r < 30 and a[i][r] == '1':
            affordable = False
        if affordable:
            tmp += B[i]
    ans = max(ans, tmp)

print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
A, B, a = [0] * N, [0] * N, [''] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())
    a[i] = str(bin(A[i])[2:]).rjust(30, '0')
k = str(bin(K)[2:]).rjust(30, '0')

ans = 0

s = k.index('1') if '1' in k else 30
for r in range(s, 30 + 1):
    tmp = 0
    for i in range(N):
        if r < 30 and k[r] == '0':
            continue
        affordable = True
        for j in range(r):
            if k[j] == '0' and a[i][j] == '1':
                affordable = False
        if r < 30 and a[i][r] == '1':
            affordable = False
        if affordable:
            tmp += B[i]
    ans = max(ans, tmp)

print(ans)
a = input()
if a == "AAA" or b == "BBB":
  print("No")
else:
  print("Yes")

### FIXED CODE ###

a = input()
if a == "AAA" or a == "BBB":
  print("No")
else:
  print("Yes")
n=int(input())
inport math
m=math.factorial(n)
print(m%(10**9+7))

### FIXED CODE ###

n=int(input())
import math
m=math.factorial(n)
print(m%(10**9+7))
import sys

ri = lambda: int(sys.stdin.readline())

print('No' if ri() == 2 or ri() == 2 else 'Yes')

### FIXED CODE ###

import sys

rm = lambda: map(int, sys.stdin.buffer.readline().split())

a, b = rm()
print('No' if a == 2 or b == 2 else 'Yes')
mport sys
N = int(input())
A = list(map(int, input().split()))
Q = int(input())


for q in range(Q):
    b, c = map(int, input().split())
    for n in range(N):
        if b == A[n]:
            A[n] = c
    print(sum(A))

### FIXED CODE ###

import collections
N = int(input())
A = list(map(int, input().split()))
cnt = collections.Counter(A)
Q = int(input())
ans = []
s = sum(A)
for _ in range(Q):
    b, c = map(int, input().split())
    n = cnt[b]
    if b in cnt:
        cnt[c] += cnt[b]
        del cnt[b]
    s += (c-b)*n
    print(s)
N = int(input())
B = list(map(int, input().split()))

ans = 0
for i in range(N):
	ans += min(A[i], A[i+1])

ans += A[N-1]

print(ans)

### FIXED CODE ###

N = int(input())
B = list(map(int, input().split()))

ans = B[0]

for i in range(N-2):
	ans += min([B[i], B[i+1]])

ans += B[N-2]

print(ans)
S=input()
ans='WA'
tmp=0
for i in range(2:len(S)-1):
  if S[i]=='C':
    tmp+=1
    
if tmp==1:
  ans='AC'
  
print(ans)

  

### FIXED CODE ###

S=input()

def solve():
  temp=0
  if S[0]!='A':
    print('WA')
    return
  if not 'a'<=S[1]<='z':
    print('WA')
    return
  for i in range(2,len(S)-1):
    if S[i]=='C':
      temp+=1
      if temp>1:
        print('WA')
        return
  if temp==0:
    print('WA')
    return
    
  if not 'a'<=S[len(S)-1]<='z':
    print('WA')
    return
  
  print('AC')

solve()
import sys
input = sys.stdin.readline

N, M = [int(x) for x in input().split()]
E = [[] for _ in range(N)]
for i in range(M):
    e = tuple([int(x) for x in input().split()])
    E[e[0] - 1].append(e[1] - 1)

dp = [-1] * N


def rec(v):
    if dp[v] != -1:
        return dp[v]

    res = 0
    for n in E[v]:
        res = max(res, rec(n) + 1)
    dp[v] = res
    return res


res = 0
for n in range(N):
    res = max(res, rec(n))

print(res)

### FIXED CODE ###

# https://atcoder.jp/contests/dp/tasks/dp_g
import sys
input = sys.stdin.readline

N, M = [int(x) for x in input().split()]

# メモ化再帰版
# E = [[] for _ in range(N)]
# for i in range(M):
#     e = tuple([int(x) for x in input().split()])
#     E[e[0] - 1].append(e[1] - 1)
#
# dp = [-1] * N
# def rec(v):
#     if dp[v] != -1:
#         return dp[v]
#
#     res = 0
#     for n in E[v]:
#         res = max(res, rec(n) + 1)
#     dp[v] = res
#     return res
#
# res = 0
# for n in range(N):
#     res = max(res, rec(n))
#
# print(res)

# BFS版
from collections import deque


deg = [0] * N  # 各頂点の入力数
dp = [0] * N   # 各頂点のスタートからの距離

E = [[] for _ in range(N)]
for i in range(M):
    e = tuple([int(x) - 1 for x in input().split()])
    E[e[0]].append(e[1])
    deg[e[1]] += 1

que = deque([i for i, v in enumerate(deg) if v == 0])

while len(que) > 0:
    v = que.popleft()
    for to in E[v]:
        deg[to] -= 1
        if deg[to] == 0:
            que.append(to)
            dp[to] = max(dp[to], dp[v] + 1)

print(max(dp))
import fractions
import math

n,X= map(int,input().split())
x = list(map(int, input().split()))
ins = 0
for i in range(n):
    if x[i] >=X:
        ins = i
        break
#x.insert(ins,X)
x = sorted(x)

print(x)

difflis = [0] * (n)

for i in range(n):
    difflis[i] = math.fabs(x[i+1] - x[i])

ans = difflis[0]
for i in range(i,len(difflis)):
    ans = fractions.gcd(ans,difflis[i])
print(int(ans))

### FIXED CODE ###

import fractions


n,X= map(int,input().split())
x = list(map(int, input().split()))
x.append(X)
x = sorted(x)

#print(x)

difflis = [0] * (n)

for i in range(n):
    difflis[i] = x[i+1] - x[i]

ans = difflis[0]
for i in range(1,len(difflis)):
    ans = fractions.gcd(ans,difflis[i])
print(ans)
h,a = map(int, input().split)
ans = 0
if h % a == 0:
  ans = h // a
else:
  ans = h // a + 1
print(ans)

### FIXED CODE ###

h,a = map(int, input().split())
ans = 0
if h % a == 0:
  ans = h // a
else:
  ans = h // a + 1
print(ans)
n = int(input())
A = [int(i) for i in input().split()]

dp = [-1 for i in range(n+5)]
import sys
sys.setrecursionlimit(100000)
def brute(i):
    if i>=n-1:
        return 0
    if dp[i]!=-1:
        return dp[i]
    ans = 10**10
    if i+1 < n:
        ans = min(ans, abs(A[i] - A[i+1]) + brute(i+1))
    if i+2 < n:
        ans = min(ans, abs(A[i] - A[i+2]) + brute(i+2))
    dp[i] = ans
    return ans

print(brute(0))


### FIXED CODE ###

n = int(input())
A = [int(i) for i in input().split()]

dp = [-1 for i in range(n+50)]
import sys
sys.setrecursionlimit(1000000)
def brute(i):
    if i>=n-1:
        return 0
    if dp[i]!=-1:
        return dp[i]
    ans = 10**10
    if i+1 < n:
        ans = min(ans, abs(A[i] - A[i+1]) + brute(i+1))
    if i+2 < n:
        ans = min(ans, abs(A[i] - A[i+2]) + brute(i+2))
    dp[i] = ans
    return ans

print(brute(0))
A, B, K= map(int, input().split())

if A >= K:
  ans_t = A - K
  ans_a = B
elif B >= ( K - A):
  ans_t = 0
  ans_a = B - ( K - A)
else:
  ans_t = 0
  ans_a = 0

print( ’{} {}’.format( ans_t, ans_a))


### FIXED CODE ###

A, B, K= map(int, input().split())
 
if A >= K:
  ans_t = A - K
  ans_a = B
elif B >= ( K - A):
  ans_t = 0
  ans_a = B - ( K - A)
else:
  ans_t = 0
  ans_a = 0
 
print( '{} {}'.format( ans_t, ans_a))
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2==0 for a in A):
  	A = [a/2 for a in A]
    cnt += 1
print(cnt)

### FIXED CODE ###

N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2==0 for a in A):
    A = [a/2 for a in A]
    cnt += 1
print(cnt)
a, b, c, d = str(input())
if a = b = c or b = c = d:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a = str(input())
if a[0] == a[1] == a[2] or a[1] == a[2] == a[3]:
    print("Yes")
else:
    print("No")
n = int(input())
is_equal = 'No'
for r_1 in range(n//4 + 1):
    sum_4 = r * 4
    for r_2 in range(n//7 + 1):
        sum_7 = r2 * 7
        if sum_4 + sum_7 == n:
            is_equal = 'Yes'
print(is_equal)

### FIXED CODE ###

n = int(input())
for r_1 in range(n//4 + 1):
    sum_4 = r_1 * 4
    for r_2 in range(n//7 + 1):
        sum_7 = r_2 * 7
        if sum_4 + sum_7 == n:
            print('Yes')
            exit()
print('No')