Harryxun/stf_run huggingface dataset:
a, b = map(int, input().split())
ans = 6
print(ans-(a+b))

### FIXED CODE ###

a = int(input())
b = int(input())
ans = 6
print(ans-(a+b))
while True:
    n=int(input())
    points=[]
    for i in range(n):
        points.append(int(input()))
    points.remove(max(points))
    points.remove(min(points))
    print(int(sum(points)/len(points)))
    if int(input())==0:break

### FIXED CODE ###

while True:
    n=int(input())
    if n==0:break
    points=[]
    for i in range(n):
        points.append(int(input()))
    points.remove(max(points))
    points.remove(min(points))
    print(int(sum(points)/len(points)))
from math import floor

N = int(input())
A = int(input())
B = int(input())

steps = floor(N / (A + B))
cap = steps * (A + B)
blue_balls = steps * A + min([N - cap, A])
print(blue_balls)

### FIXED CODE ###

from math import floor

inp = input()
N, A, B = [int(x) for x in inp.split(" ")]

steps = floor(N / (A + B))
cap = steps * (A + B)
blue_balls = steps * A + min([N - cap, A])
print(blue_balls)
n, m = map(int, input().split())
ab = [list(map(int, input().split()))]

friends = [0]*n
group = [-1]*n

for a, b in ab:
    if a > b:
        a, b = b, a
    a -= 1
    b -= 1
    if group[a] == -1 and group[b] == -1:
        group[a] = a
        group[b] = b
        friends[a] += 2
    elif group[a] != -1 and group[b] != -1:
        group[b] = group[a]
        friends[group[a]] += friends[group[b]]
    elif group[a] == -1:
        group[a] = group[b]
        friends[group[b]] += 1
    elif group[b] == -1:
        group[b] = group[a]
        friends[group[a]] += 1

print(max(friends))


### FIXED CODE ###

#https://note.nkmk.me/python-union-find/

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

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

uf = UnionFind(n)

for _ in range(m):
    a, b = map(int, input().split())
    uf.union(a-1, b-1)

ans = 0

for i in range(n):
    ans = max(ans, uf.size(i))

print(ans)
N = int(input())
arr = list(map(int, input().split()))
memo = [0]*(max(arr)+N+1)
ans = 0
for i in range(N):
    if (i+1)-arr[i] >= 0:
        ans += memo[(i+1)-arr[i]]
    if (i+1)+arr[i] > 0:
        memo[(i+1)+arr[i]] += 1
print(ans)

### FIXED CODE ###

from collections import defaultdict
d = defaultdict(int)
N = int(input())
arr = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans += d[(i+1)-arr[i]]
    d[(i+1)+arr[i]] += 1
print(ans)
N,Q=map(int,input().split())
S=input()

lis = [0] * len(S)
for i in range(len(S)):

  if i>0:
    lis[i] += lis[i-1]
  if i < len(S)-1 and S[i] == 'A' and S[i+1] == 'C':
    lis[i+1] += 1


for _ in range(Q):
  L = tuple(map(int, input().split()))

  c = 0
  print(lis[L[1]-1]-lis[L[0]-1])


### FIXED CODE ###

N,Q=map(int,input().split())
S=input()

lis = [0] * len(S)
for i in range(len(S)):

  if i>0:
    lis[i] += lis[i-1]
  if i < len(S)-1 and S[i] == 'A' and S[i+1] == 'C':
    lis[i+1] += 1


for _ in range(Q):
  L = tuple(map(int, input().split()))

  c = 0
  print(lis[L[1]-1]-lis[L[0]-1])
k, n = map(int, input().split())
aa = map(int, input().split())

B = []

for i in range(1, n):
    B.append(aa[i]-aa[i-1])
    
B.append(k-sum(B))
print(k-max(B))

### FIXED CODE ###

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

B = []

for i in range(1, n):
    B.append(aa[i] - aa[i - 1])

B.append(k - sum(B))
print(k - max(B))
N = int(input())
kuku = []
for i in range(1,10):
  for j in range(1,10):
    kuku.append(i*j)
    
if N in kuku:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b = input().split()
a = int(a)
b = int(b)
if a >= 10 or b >=10:
  print ('-1')
else:
  print (a * b)
print(int(input)*2*3.141592)

### FIXED CODE ###

print(int(input())*2*3.141592)
N =int(input())
if N%9 == 0:
  print('Yes')
else;
  print('No')

### FIXED CODE ###

N=int(input())
print('Yes' if N%9==0 else 'No')
import math
import fractions

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

AL=[0]*N
AR=[0]*N
for i in range(N):
    if i == 0:
        AL[0] = A[0]
        AR[0] = A[N-1]
    else:
        AL[i] = math.gcd(AL[i-1],A[i])
        AR[i] = math.gcd(AR[i-1],A[N-i-1])

max=0
for i in range(N):
    if i == 0:
        n_ex_gcd =  AR[N-2]
    elif i == N-1:
        n_ex_gcd = AL[N-2]
    else:
        n_ex_gcd = math.gcd(AL[i-1],AR[N-i-2])
    if n_ex_gcd > max:
        max = n_ex_gcd
print(max)


### FIXED CODE ###

def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

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

AL=[0]*N
AR=[0]*N
for i in range(N):
    if i == 0:
        AL[0] = A[0]
        AR[0] = A[N-1]
    else:
        AL[i] = gcd(AL[i-1],A[i])
        AR[i] = gcd(AR[i-1],A[N-i-1])

max=0
for i in range(N):
    if i == 0:
        n_ex_gcd =  AR[N-2]
    elif i == N-1:
        n_ex_gcd = AL[N-2]
    else:
        n_ex_gcd = gcd(AL[i-1],AR[N-i-2])
    if n_ex_gcd > max:
        max = n_ex_gcd
print(max)
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
    print(aaaaa)
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        if (b>3):
            if '...' in s[:b]:
                flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[b-2:d+1]:
        flg = True
if '##' in s[a-1:max(d,c)-1]:
    flg = False
if flg:
    print('Yes')
else:
    print('No')
n = int(input())  
num_list = []
for i in range(n):
    num_list.append(list(map(int,input().split())))

ans = []
for i in range(n):
  a = num_list[i]
  a1= a[0]
  a2 = a[1]
  if a1 == a2:
    ans.append(1)
    if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:
      print('Yes')
      break
  else:
    ans.append(0)
if len(ans) == n:
  print('No')


### FIXED CODE ###

n = input()
if n[-1] == 's':
  print(n+'es')
else:
  print(n+'s')
n = input()
d = {"S":[none]*13, "H":[none]*13, "C":[none]*13, "D":[none]*13}

for i in range(n):
	x, y = raw_input().split()
	d[x][int(y)-1] = True

for k in ["S","H","C","D"]:
	for i in range(13):
		if d[k][i] == True:
		print ("%s %d"%(k, i+1))

### FIXED CODE ###

n = int(raw_input())
lst = []
#store all the cards
for i in ["S","H","C","D"]:
	for j in xrange(1,14):
		lst.append("{0} {1}".format(i,j))
#discard the given cards
for i in range(n):
	a = raw_input()
	lst.remove(a)
#print the result
for i in range(len(lst)):
	print lst[i]
X,Y=map(int,input().split())
import math
def f2(r):

    return inv_t
def co(n,r):
    P = 10**9 + 7
    N = r+1
    inv_t = [0]+[1]
    for i in range(2,N+1):
        inv_t += [inv_t[P % i] * (P - int(P / i)) % P]
    ans =1
    for i in range(1,r+1):
        ans = (ans * (n+i-1)) % P
    for i in range(1,r+1):
        ans = (ans * inv_t[i]) % P
    return ans
if (X+Y)%3==0:
    Z=X+Y
    if min(X,Y)-Z//3 >-1:
        #print(1)
        comb = Combination(Z//3)
        print(comb(Z//3,min(X,Y)-Z//3))
        #print(co(Z//3,min(X,Y)-Z//3))
    else:
        print(0)
else:
    print(0)

### FIXED CODE ###

X,Y=map(int,input().split())
import math

def combination(n, r, mod=10**9+7):
    n1, r = n+1, min(r, n-r)
    numer = denom = 1
    for i in range(1, r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom, mod-2, mod) % mod

def f2(r):

    return inv_t
def co(n,r):
    P = 10**9 + 7
    N = r+1
    inv_t = [0]+[1]
    for i in range(2,N+1):
        inv_t += [inv_t[P % i] * (P - int(P / i)) % P]
    ans =1
    for i in range(1,r+1):
        ans = (ans * (n+i-1)) % P
    for i in range(1,r+1):
        ans = (ans * inv_t[i]) % P
    return ans
if (X+Y)%3==0:
    Z=X+Y
    if min(X,Y)-Z//3 >-1:
        #print(1)
        print(combination(Z//3,min(X,Y)-Z//3))
        #print(co(Z//3,min(X,Y)-Z//3))
    else:
        print(0)
else:
    print(0)
a,b = map(int,input().split())
print(a*b - (a+b-1)

### FIXED CODE ###

a,b = map(int,input().split())
print(a*b - (a+b-1))
n,a,b,c = map(int, input().split())
l = [int(input()) for _ in range(n)]
def dfs(k,p,q,r):
  if k == n:
    if min(a,b,c) > 0:
      return abs(p-a)+abs(q-b)+abs(r-c)-30
    else:
      return 10**5
  t1 = dfs(k+1,p,q,r)
  t2 = dfs(k+1,p+l[k],q,r)+10
  t3 = dfs(k+1,p,q+l[k],r)+10
  t2 = dfs(k+1,p,q,r+l[k])+10
  return min(t1,t2,t3,t4)

print(dfs(0,0,0,0))

### FIXED CODE ###

n,a,b,c = map(int, input().split())
l = [int(input()) for _ in range(n)]
def dfs(k,p,q,r):
  if k == n:
    if min(p,q,r) > 0:
      return abs(p-a)+abs(q-b)+abs(r-c)-30
    else:
      return 10**7
  t1 = dfs(k+1,p,q,r)
  t2 = dfs(k+1,p+l[k],q,r)+10
  t3 = dfs(k+1,p,q+l[k],r)+10
  t4 = dfs(k+1,p,q,r+l[k])+10
  return min(t1,t2,t3,t4)

print(dfs(0,0,0,0))
import math

S = input().split()
A = int(S[0])
B = int(S[1])
C = int(S[2])
D = int(S[3])

CD = C * D / math.gcd(C, D)
X = (B//C)-(A//C)
Y = (B//D)-(A//D)
Z = (B//(CD))-(A//(CD))+1

print(B-A-X-Y+Z)


### FIXED CODE ###


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

 #最小公倍数


def lcm(a, b):
    return a*b//gcd(a, b)


S = input().split()
A = int(S[0])
B = int(S[1])
C = int(S[2])
D = int(S[3])

E = lcm(C, D)

X = int(B//C)-int((A-1)//C)
Y = int(B//D)-int((A-1)//D)
Z = int(B//E)-int((A-1)//E)

print(B-A+1-X-Y+Z)
import sys
n, m = map(int, input().split())
G = [[] for _ in range(n)]
cnt = [0]*n
for _ in range(m):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
    cnt[a-1]+=1
    cnt[b-1]+=1
if any(cnt[i]%2 == 1 for i in range(n)):
    print('No')
    sys.exit()
c = cnt.count(4)
if any(cnt[i]>=6 for i in range(n)) or c>=3:
    print('Yes')
    sys.exit()
if c<1:
    print('No')
    sys.exit()
print(1/0)
v = cnt.index(4)
for v0 in G[v]:
    now = v0
    p = v
    while True:
        for nv in G[now]:
            if nv == p:
                continue
            p = now
            now = nv
            break
        if now == v:
            print('Yes')
            sys.exit()
        if cnt[now] == 4:
            break
print('No')
        

### FIXED CODE ###

import sys
n, m = map(int, input().split())
G = [[] for _ in range(n)]
cnt = [0]*n
for _ in range(m):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
    cnt[a-1]+=1
    cnt[b-1]+=1
if any(cnt[i]%2 == 1 for i in range(n)):
    print('No')
    sys.exit()
c = cnt.count(4)
if any(cnt[i]>=6 for i in range(n)) or c>=3:
    print('Yes')
    sys.exit()
if c<=1:
    print('No')
    sys.exit()
v = cnt.index(4)
for v0 in G[v]:
    now = v0
    p = v
    while True:
        for nv in G[now]:
            if nv == p:
                continue
            p = now
            now = nv
            break
        if now == v:
            print('Yes')
            sys.exit()
        if cnt[now] == 4:
            break
print('No')
a, b, c, d = map(int, input().split())
row = [0 for i in range(101)]
for i in range(a, b+1) : row[i] += 1
for i in range(c, d+1) : row[i] += 1
if row.count(2) == 0 : print(0)
else : print(raw.count(2)-1)


### FIXED CODE ###

a, b, c, d = map(int, input().split())
row = [0 for i in range(101)]
for i in range(a, b+1) : row[i] += 1
for i in range(c, d+1) : row[i] += 1
if row.count(2) == 0 : print(0)
else : print(row.count(2)-1)
s = list(input())
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for x in s:
    alpha.remove(x)
print(alpha[0] if len(alpha)>0 else "None")

### FIXED CODE ###

s = list(input())
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for x in s:
    if x in alpha:
        alpha.remove(x)
print(alpha[0] if len(alpha)>0 else "None")
import numpy as np

n = int(input())
a_array = np.array([int(elem) for elem in input().split(' ')])


def calculate_cumulative_sum(a_array, n):
    cumul_sum_array = np.zeros(n, dtype=np.int32)
    cumul_sum_array[0] = a_array[0]
    for i in range(1, n):
        cumul_sum_array[i] = cumul_sum_array[i - 1] + a_array[i]
    return cumul_sum_array


def check_1(cumul_sum_array):
    result = (cumul_sum_array != 0).all()
    return result


def check_2(cumul_sum_array):
    odd = np.sign(cumul_sum[::2])
    even = np.sign(cumul_sum[1::2])
    odd_sign = np.unique(odd)
    even_sign = np.unique(even)
    return (len(odd_sign) == 1) * (len(even_sign) == 1) * (odd_sign[0] != even_sign[0])


cumul_sum = calculate_cumulative_sum(a_array, n)
count = {'plus': 0, 'minus': 0}

def calc_num_manipulation(cumul_sum, start, n):
    cumul_sum = cumul_sum.copy()
    count = 0
    if check_1(cumul_sum) and check_2(cumul_sum):
        return count
    
    for i in range(n):
        if i == 0:
            diff = cumul_sum[i] - start
            count += abs(diff)
            cumul_sum[i:] -= diff
        else:
            if cumul_sum[i - 1] < 0 and cumul_sum[i] <= 0:
                diff = cumul_sum[i] - 1
                count += abs(diff)
                cumul_sum[i:] -= diff
            elif cumul_sum[i - 1] > 0 and cumul_sum[i] >= 0:
                diff = cumul_sum[i] - (-1)
                count += abs(diff)
                cumul_sum[i:] -= diff
            else:
                continue
    return count

count['plus'] = calc_num_manipulation(cumul_sum, 1, n)
count['minus'] = calc_num_manipulation(cumul_sum, -1, n)
print(min(count.values()))


### FIXED CODE ###

n = int(input())
a_list = list(map(int, input().split(' ')))

def count_manipulation(a_list, start):
    assert start in (0, 1)
    sum = 0
    count = 0
    for i, a in enumerate(a_list):
        sum += a
        if i % 2 == start:
            if sum > 0:
                continue
            else:
                diff = 1 - sum
                count += diff
                sum += diff
        else:
            if sum < 0:
                continue
            else:
                diff = sum - (-1)
                count += diff
                sum -= diff
    return count

count_plus = count_manipulation(a_list, 0)
count_minus = count_manipulation(a_list, 1)
print(min(count_plus, count_minus))
n=int(input())
s=list(input())
for i in range(n-1):
  if s[i] == s[i+1]:
    del s[i+1]
  else:
    continue
print(len(s))

### FIXED CODE ###

n=int(input())
s=list(input())
a=[]
a.append(s[0])
for i in range(n-1):
  if s[i] != s[i+1]:
    a.append(s[i+1])
  else:
    continue
print(len(a))
import functools
import math
n,x = map(int,input().split())
values = list(map(int,input().split()))
for i in range(n):
    values[i] = abs(values[i]-x)
gcd = functools.reduce(math.gcd, values)
print(gcd)

### FIXED CODE ###


def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a
n,x = map(int,input().split())
values = list(map(int,input().split()))
for i in range(n):
    values[i] = abs(values[i]-x)
ass = values[0]
for i in range(n):
    ass = gcd(ass,values[i])
print(ass)
week={'SUN'=0
      'MON'=1
      'TUE'=2
      'WED'=3
      'THU'=4
      'FRI'=5
      'SAT'=6

print(7-week)      

### FIXED CODE ###

s = input()
week = {'SUN':0,
        'MON':1,
        'TUE':2, 
        'WED':3, 
        'THU':4, 
        'FRI':5, 
        'SAT':6}
print(7-week[s])
n=int(input())
da=list(map((int,input().split()))
ans=0
fro i in range da:
  ans+=i-1
print(ans)

### FIXED CODE ###

n=int(input())
da=list(map(int,input().split()))
ans=0
for i in da:
  ans+=i-1
print(ans)
import numpy as np


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

A.sort()
e = np.zeros(10**6 + 1)
ans = 0
for i in range(N):
    if e[A[i]] == 0:
        e[::A[i]] = 1 # スライスで倍数indexを一気に変更できる。すごい。
        # 同じ値が重複していないか判定
        if A[i] != A[i+1]:
            ans += 1
print(ans)

### FIXED CODE ###

import numpy as np


N = int(input())
A = list(map(int, input().split())) + [10**7]

A.sort()
e = np.zeros(10**6 + 1)
ans = 0
for i in range(N):
    if e[A[i]] == 0:
        e[::A[i]] = 1 # スライスで倍数indexを一気に変更できる。すごい。
        # 同じ値が重複していないか判定
        if A[i] != A[i+1]:
            ans += 1
print(ans)
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

import numpy as np

import math

def rootCheck(checkList):
    nextList=[]
    for i in checkList:
        for j in root[i]:
            if hint[j] == -1:
                hint[j] = i
                nextList.append(j)
    if len(nextList) >0:
        rootCheck(nextList)



if __name__ == '__main__':
    n, m = map(int, input().split())
    root = {}
    for i in range(m):
        b, c = map(int, input().split())
        if b-1 in root:
            root[b-1].append(c-1)
        else:
            root[b-1]=[c-1]
        if c-1 in root:
            root[c-1].append(b-1)
        else:
            root[c-1]=[b-1]
 
    hint =[-1]*n

    rootCheck(root[0])

    if -1 in hint:
        print("No")
    else:
        print("Yes")
        for i in hint[1:]:
            print(i+1)




### FIXED CODE ###

import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

import numpy as np

import math

def rootCheck(checkList):
    nextList=[]
    for i in checkList:
        for j in root[i]:
            if hint[j] == -1:
                hint[j] = i
                nextList.append(j)
    if len(nextList) >0:
        rootCheck(nextList)



if __name__ == '__main__':
    sys.setrecursionlimit(10 ** 6)
    n, m = map(int, input().split())
    root = {}
    for i in range(m):
        b, c = map(int, input().split())
        if b-1 in root:
            root[b-1].append(c-1)
        else:
            root[b-1]=[c-1]
        if c-1 in root:
            root[c-1].append(b-1)
        else:
            root[c-1]=[b-1]
    hint =[-1]*n

    for i in root[0]:
        if hint[i] == -1:
            hint[i] = 0


    rootCheck(root[0])

    if -1 in hint:
        print("No")
    else:
        print("Yes")
        for i in hint[1:]:
            print(i+1)
from math import gcd
from functools import reduce
def gcds(numbers):
  return reduce(gcd, numbers)
K = int(input())
ans = 0
for a in range(1, K + 1):
  for b in range(1, K + 1):
    for c in range(1, K + 1):
      ans += gcds(a, b, c)
print(ans)

### FIXED CODE ###

from math import gcd
from functools import reduce
def gcds(*numbers):
  return reduce(gcd, numbers)
K = int(input())
ans1 = 0
ans2 = 0
ans3 = 0
for a in range(1, K + 1):
  for b in range(a, K + 1):
    for c in range(b, K + 1):
      if a == b and b == c:
        ans1 += gcds(a, b, c)
      elif a == b or b == c or c == a:
        ans2 += gcds(a, b, c)
      else:
        ans3 += gcds(a, b, c)
print(ans1 + 3 * ans2 + 6 * ans3)
import sys
INF=10000000000
def frog(i,K,h,dp):
    global INF
    if dp[i]!=INF:
        return dp[i]
    else:
        cost=INF
        for k in range(1,K+1):
            if i-k-1>=0:
                x=frog(i-k,K,h,dp)+abs(h[i-1]-h[i-k-1])
                if cost>x:
                    cost=x
                continue
            break
        dp[i]=cost
        return dp[i]
sys.setrecursionlimit(INF)
N,K=map(int,input().split())
h=list(map(int,input().split()))
dp=[INF for i in range(N+1)]
dp[1]=0
dp[2]=abs(h[1]-h[0])
print(frog(N,K,h,dp))


### FIXED CODE ###

import numpy as np
N,K=map(int,input().split())
h=list(map(int,input().split()))
h=np.array(h)
cost=np.zeros(N+1)
cost[1]=0
cost[2]=abs(h[1]-h[0])
for i in range(3,N+1):
    x=1 if i-K<=1 else i-K
    cost[i]=(cost[x:i]+abs(h[i-1]-h[x-1:i-1])).min()
print(int(cost[N]))
import ceil from math
a, b = map(int, input().split())
print(ceil((a+b)/2))

### FIXED CODE ###

from math import ceil 
a, b = map(int, input().split())
print(ceil((a+b)/2))
import math
from functools import reduce
input()
N=list(map(int,input().split()))
reduce(math.gcd,N)

### FIXED CODE ###

import fractions
from functools import reduce
input()
N=list(map(int,input().split()))
print(reduce(fractions.gcd,N))
import math
n, m = map(int, input().split())
listS = list(input())
listT = list(input())
listX = []

l= n*m // math.gcd(n, m)
a=l//n
b=l//m

if listS[0]!=listT[0]:
    print(-1)
else:
    index =0
    index2=0
    while index < l:
        while index2 < n:
            if index == index2*a:
                listX.append(listS[index2])
                index2+=1
                index+=1
            else:
                listX.append(0)
                index+=1
        index+=1
    index4=0
    flag=0
    while index4 < min(m, l//b):
        if listX[index4*b] == listT[index4] or listX[index4*b] == 0:
            index4+=1
        else:
            print(-1)
            flag=1
            break
    if flag!=1:
        print(l)

### FIXED CODE ###

n, m = map(int, input().split())
listS= list(input())
listT = list(input())


def gcd(a, b):
	while b:
		a, b = b, a % b
	return a


l = n*m // gcd(n, m)
a = l//n
b = l//m

if listS[0]!=listT[0]:
    print(-1)
else:
    checkI = a*b // gcd(a, b)
    if checkI > l:
        print(l)
    else:
        index=0
        flag=0
        while index < l//min(a, b):
            if index*checkI//a > len(listS)-1 or index*checkI//b > len(listT)-1:
                break
            elif listS[index*checkI//a] != listT[index*checkI//b]:
                print(-1)
                flag=1
                break
            else:
                index+=1
        if flag==0:
            print(l)
while(True):
    x = 0
    for i in input():
        x += int(i)
    print(x)


### FIXED CODE ###

while(True):
    num = input()
    if num == '0':
        break
    x = 0
    for i in num:
        x += int(i)
    print(x)
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

count = 0
while k > 0:
    for i in range(n+m):
        if len(a) == 0:
            if len(b) == 0:
                k = 0
                break
            elif k >= b[0]:
                btop = b.pop(0)
                k -= btop
                count += 1
            else:
                k = 0
                break
        elif len(b) == 0:
            if len(a) == 0:
                k = 0
                break
            elif k >= a[0]:
                btop = a.pop(0)
                k -= atop
                count += 1
            else:
                k = 0
                break
                
        elif a[0] > k and b[0] > k:
            k = 0
            break
        elif b[0] >= a[0]:
            atop = a.pop(0)
            k -= atop
            count += 1
        elif a[0] > b[0]:
            btop = b.pop(0)
            k -= btop
            count += 1

print(count)


### FIXED CODE ###

n,m,k=map(int,input().split())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
acum1=[0]
for i in range(n): #累積和ai,bjを求める
 acum1.append(acum1[-1]+arr1[i])
acum2=[0]
for i in range(m):
 acum2.append(acum2[-1]+arr2[i])
ans=0
j=m
for i in range(n+1):
 if acum1[i]>k: #ai>Kであれば、どのようにjを選んでもai+bj<=Kとなることはないので探索を終了する
   break
 while acum2[j]>k-acum1[i] and j>0: #各iについて、bj<=K-aiを満たす最大のjを求める
   j-=1
 ans=max(ans,i+j)
print(ans)
from math import gcd
a, b = map(int, input().split())
print(int(a * b / gcd(a, b)))


### FIXED CODE ###

from fractions import gcd
a, b = map(int, input().split())
print(int(a * b / gcd(a, b)))