Harryxun/stf_run huggingface dataset:
def pow(base, nod):
	MOD = 10**9+7
	ans = 1
	tmp = 2
	while base>0:
		if base%2==1: ans=ans*tmp%MOD
		tmp = tmp**2%MOD
		base /= 2
	return ans

n=int(raw_input())
a=map(int,raw_input().split())
d={}
for i in xrange(n):
	if a[i] not in d: d[a[i]]=0
	d[a[i]]+=1
isValid=True
if n%2==0:
	for k,v in d:
		if k%2!=1 or v!=2:
		isValid=False
else:
	for k,v in d:
		if k%2!=0 or (k==0 and v!=1) or (k!=0 and v!=2):
		isValid=False
if isValid:
	print pow(2, n/2)
else:
	print 0

### FIXED CODE ###

def pow(base, nod):
  MOD = 10**9+7
  ans = 1
  tmp = base
  while nod>0:
    if nod%2==1: ans=ans*tmp%MOD
    tmp = tmp**2
    tmp %= MOD
    nod /= 2
  return ans

n=int(raw_input())
a=map(int,raw_input().split())
d={}
for i in xrange(n):
  if a[i] not in d: d[a[i]]=0
  d[a[i]]+=1
isValid=True
if n%2==0:
  for k,v in d.items():
    if k%2!=1 or v!=2:
      isValid=False
else:
  for k,v in d.items():
    if k%2!=0 or (k==0 and v!=1) or (k!=0 and v!=2):
      isValid=False
if isValid:
  print pow(2, n/2)
else:
  print 0
R = input()R = input()
print(int(R)*int(R))

### FIXED CODE ###

R = input()
print(int(R)*int(R))
N=int(input())
A=list(map(int,input().split()))
D={}
for a in A:
  if(a in D):
    D[a]+=1
  else:
    D[a]=1
    
if(len(D)>2):
  print("No")
  exit()
  
if(len(D)==2):
  B=max(D)
  if(B-D[B-1]>0 and D[B]>=2*(B-D[B-1])):
    print("Yes")
  else:
    print("No")
  
else:
  B=max(D) # 常に同じ色の人がいる
  if(N>=2*B):
    print("Yes")
    exit()
  
  B=max(D)+1 # 全員違う色
  if(B==N):
    print("Yes")
    exit()
  print("No")
  

### FIXED CODE ###


N=int(input())
A=list(map(int,input().split()))
D={}
for a in A:
  if(a in D):
    D[a]+=1
  else:
    D[a]=1
    
if(max(D)-min(D)>1):
  print("No")
  exit()
  
if(len(D)==2):
  B=max(D)
  if(B-D[B-1]>0 and D[B]>=2*(B-D[B-1])):
    print("Yes")
  else:
    print("No")
  
else:
  B=max(D) # 常に同じ色の人がいる
  if(N>=2*B):
    print("Yes")
    exit()
  
  B=max(D)+1 # 全員違う色
  if(B==N):
    print("Yes")
    exit()
  print("No")
import sys
import os
import math
import bisect
import collections
import itertools

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    sm = sum(A)
    print(min([math.gcd(sm, a) for a in A]))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import os
import math
import bisect
import collections
import itertools
from fractions import gcd

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    sm = sum(A)
    print(min([gcd(sm, a) for a in A]))


if __name__ == '__main__':
    main()
from math import sqrt

while True:
    e = int(raw_input())

    if e == 0: break

    z, ans = 0, e

    for z in range(e+1):
        if z**3 > e: break
        y = int(sqrt(e - z**3))
        x = e - y**2 - z**3
        ans = min(ans, x+y+z)

    print ans



### FIXED CODE ###

#!/usr/bin/env python3

from math import sqrt

while True:
    e = int(input())

    if e == 0: break
    z, ans = 0, e

    while z ** 3 <= e:
        y = int(sqrt(e - z**3))
        x = e - y**2 - z**3
        ans = min(ans, x + y + z)
        z += 1

    print(ans)
H, W = map(int, input().split())
s, dp, ans = [], {}, 0
for i in range(H):
    s.append(input())
def getRightCount(h, w):
    key = str(h) + str(w) + 'r'
    if key in dp:
        return dp[key]
    elif s[h][w] == '#':
        dp[key] = 0
    elif w == W - 1:
        dp[key] = 0
    elif s[h][w+1] == '#':
        dp[key] = 0
    else:
        dp[key] = 1 + getRightCount(h, w+1)
    return dp[key]
def getLeftCount(h, w):
    key = str(h) + str(w) + 'l'
    if key in dp:
        return dp[key]
    elif s[h][w] == '#':
        dp[key] = 0
    elif w == 0:
        dp[key] = 0
    elif s[h][w-1] == '#':
        dp[key] = 0
    else:
        dp[key] = 1 + getLeftCount(h, w-1)
    return dp[key]
def getDownCount(h, w):
    key = str(h) + str(w) + 'd'
    if key in dp:
        return dp[key]
    elif s[h][w] == '#':
        dp[key] = 0
    elif h == H - 1:
        dp[key] = 0
    elif s[h+1][w] == '#':
        dp[key] = 0
    else:
        dp[key] = 1 + getDownCount(h+1, w)
    return dp[key]
def getUpCount(h, w):
    key = str(h) + str(w) + 'u'
    if key in dp:
        return dp[key]
    elif s[h][w] == '#':
        dp[key] = 0
    elif h == 0:
        dp[key] = 0
    elif s[h-1][w] == '#':
        dp[key] = 0
    else:
        dp[key] = 1 + getUpCount(h-1, w)
    return dp[key]
def getCount(h, w):
    if s[h][w] == '#':
        return 0
    rCnt, lCnt, uCnt, dCnt = 0,0,0,0
    key = str(h) + str(w)
    # to right
    rkey = key + 'r'
    rCnt = getRightCount(h, w)
    # to left
    lkey = key + 'l'
    lCnt = getLeftCount(h, w)
    # to down
    dkey = key + 'd'
    dCnt = getDownCount(h, w)
    # to up
    ukey = key + 'u'
    uCnt = getUpCount(h, w)
    return rCnt + lCnt + uCnt + dCnt + 1

for i in reversed(range(H)):
    for j in reversed(range(W)):
        ans = max(ans, getCount(i, j))
print(ans)

### FIXED CODE ###

H, W = map(int, input().split())
s, ans = [], 0
dpr = [[0] * W for _ in range(H)]
dpl = [[0] * W for _ in range(H)]
dpd = [[0] * W for _ in range(H)]
dpu = [[0] * W for _ in range(H)]

for i in range(H):
    s.append(input())

# to right
for i in range(H):
    for j in reversed(range(W)):
        if j == W-1 and s[i][j] == '.':
            dpr[i][j] = 1
        elif s[i][j] == '#':
            dpr[i][j] = 0
        else:
            dpr[i][j] = dpr[i][j+1] + 1

# to left
for i in range(H):
    for j in range(0, W):
        if j == 0 and s[i][j] == '.':
            dpl[i][j] = 1
        elif s[i][j] == '#':
            dpl[i][j] = 0
        else:
            dpl[i][j] = dpl[i][j-1] + 1

# to down
for i in reversed(range(H)):
    for j in range(W):
        if i == H-1 and s[i][j] == '.':
            dpd[i][j] = 1
        elif s[i][j] == '#':
            dpd[i][j] = 0
        else:
            dpd[i][j] = dpd[i+1][j] + 1

# to up
for i in range(0, H):
    for j in range(W):
        if i == 0 and s[i][j] == '.':
            dpu[i][j] = 1
        elif s[i][j] == '#':
            dpu[i][j] = 0
        else:
            dpu[i][j] = dpu[i-1][j] + 1

for i in reversed(range(H)):
    for j in reversed(range(W)):
        cnt = dpr[i][j] + dpl[i][j] + dpd[i][j] + dpu[i][j] - 3
        ans = max(ans, cnt)

print(ans)
L_yoko = [list(map(int,input().split())) for i in range(3)]

n = 9
ans = [int(input()) for _ in range(n)]

L_tate = list(zip(*L_yoko))

L_naname = []
L_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])
L_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])

a = int(0)
for z in L_tate:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break

for z in L_yoko:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break

for z in L_naname:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break

if a == 0:
    print("No")
else:
    print("Yes")


### FIXED CODE ###

L_yoko = [list(map(int,input().split())) for _ in range(3)]


L_tate = list(zip(*L_yoko))

L_naname = []
L_naname.append([L_yoko[0][0],L_yoko[1][1],L_yoko[2][2]])
L_naname.append([L_yoko[0][2],L_yoko[1][1],L_yoko[2][0]])

n = int(input())
ans = [int(input()) for _ in range(n)]

a = int(0)
for z in L_tate:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break

for z in L_yoko:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break

for z in L_naname:
    if z[0] in ans and z[1] in ans and z[2] in ans:
         a = 1
         break


if a == 0:
    print("No")
else:
    print("Yes")
a,b,h=map(int,input().split())
print(int((a+b)*h/2))

### FIXED CODE ###

a,b,h=int(input()),int(input()),int(input())
print(int((a+b)*h/2))
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(min(a, b) + min(c, d))

### FIXED CODE ###

n = int(input())
d, x = map(int, input().split())
a = [int(input()) for i in range(n)]
c = 0
for i in range(n):
    for j in range(1, d + 1):
        if a[i] == 1:
            c += 1
        elif j % a[i] == 1:
            c += 1
print(c + x)
import functools
import math
N,X = map(int,input().split())
L = list(map(int,input().split()))
L.append(X)
L = sorted(L)
D = []
for i in range(N) :
    d = L[i+1] - L[i]
    D.append(d)
answer = functools.reduce(math.gcd,D)
print(answer)



### FIXED CODE ###

N, X = map(int, input().split())
A = list(map(int, input().split()))
diff = [abs(a - X) for a in A]

# 最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


while len(diff) > 1:
    a, b = diff.pop(), diff.pop()
    diff.append(gcd(a, b))

print(diff[0])
a=list(map(int,input().split()))
a=sorted(a)

a_ave=a[0]+a[-1]
num1=a_ave//2
num2=a_ave//2+1
ans1=0
ans2=0
for i in range(n):
    ans1+=(num1-a[i])**2
    ans2+=(num2-a[i])**2
print(min(ans1,ans2))

### FIXED CODE ###

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

ans=float('inf')
num=-100
while num!=101:
    kari=0
    for i in range(n):
        kari+=(num-a[i])**2
    num+=1
    ans=min(ans,kari)

print(ans)
n = int(input())

csf = []

for i in range(n - 1):
    c, s, f = map(int, input().split())
    csf.append([c, s, f])

ans = []
for i in range(n - 1):
    tmp = csf[i][0] + csf[i][1]
    for j in range(i + 1, n - 1):
        if tmp < csf[j][1]:
            tmp = csf[j][0] + csf[j][1]
        elif (tmp - csf[j][1]) % csf[j][2] == 0:
            tmp += csf[j][0]
        else:
            tmp = ((tmp // csf[j][2] + 1) * csf[j][2] + csf[j][0]
    ans.append(tmp)
ans.append(0)

print(*ans, sep="\n")

### FIXED CODE ###

n = int(input())

csf = []

for i in range(n - 1):
    c, s, f = map(int, input().split())
    csf.append([c, s, f])

ans = []
for i in range(n - 1):
    tmp = csf[i][0] + csf[i][1]
    for j in range(i + 1, n - 1):
        if tmp < csf[j][1]:
            tmp = csf[j][0] + csf[j][1]
        elif (tmp - csf[j][1]) % csf[j][2] == 0:
            tmp += csf[j][0]
        else:
            tmp = (tmp // csf[j][2] + 1) * csf[j][2] + csf[j][0]
    ans.append(tmp)
ans.append(0)

print(*ans, sep="\n")
S = input()
if len(S) >= 10:
  print("NO")
else:
  if S == "AKIHABARA":
    print("YES")
  elif S == "KIHABARA":
    print("YES")
  elif S == "AKIHBARA":
    print("YES")
  elif S == "AKIHABRA":
    print("YES")
  elif S == "AKIHABR":
    print("YES")
  elif S == "KIHBARA":
    print("YES")
  elif S == "KIHABRA":
    print("YES")
  elif S == "KIHABAR":
    print("YES")
  elif S == "AKIHBRA":
    print("YES")
  elif S == "AKIHABR":
    print("YES")
  elif S == "KIHBRA":
    print("YES")
  elif S == "KIHBAR":
    print("YES")
  elif S == "AKIHBR":
    print("YES")
  elif S == "KIHBR":
    print("YES")
  else:
  print("NO")


### FIXED CODE ###

S=input()

pos={"AKIHABARA","KIHABARA","AKIHBARA","KIHBARA","AKIHABRA","KIHABRA","AKIHBRA","KIHBRA","AKIHABAR","KIHABAR","AKIHBAR","KIHBAR","AKIHABR","KIHABR","AKIHBR","KIHBR"}
     
if S in pos:
  print("YES")
else:
  print("NO")
a,_,b=map(int,input().split())
print('DH'[a==b])

### FIXED CODE ###

a,_,b=input()
print("DH"[a==b])
K = input().split()
N = int(K[0])
K = int(K[1])

count = 0
for b in range(K+1, N+1):
        count += int((N-K*(K+1)/2+(b-2)*(b-1)/2)/b)


if K != 0:
    for a in range(K, N+1):
        count += N-a
if K == 0:
        for a in range(1, N+1):
            count += N-a

print(count)

### FIXED CODE ###

sanmoji=[0]*3
for i in range(3):
    sanmoji[i] = input()[i]

moji=""
for i in range(3):
    moji += sanmoji[i]
print(moji)
print("YNeos"[input()==input([:-1])::2])

### FIXED CODE ###

print("YNeos"[input()!=input()[:-1]::2])
n = int(input())
scores = list(map(int, input().split()))
colors = [0] * 9

for score in scores:
    colors[score // 400] += 1

ans = sum(colors[x] > 0 for x in range(8))
print(ans, ans + colors[8])

### FIXED CODE ###

n = int(input())

scores = list(map(int, input().split()))

colors = [0] * 8
over = 0

for score in scores:
    if score < 3200:
        colors[score // 400] += 1
    else:
        over += 1

ans = sum(color > 0 for color in colors)

if ans:
    print(ans, ans + over)
else:
    print(1, over)
n, m = map(int, input().split())
A = set()
for i in range(m):
    a = int(input())
    A.add(a)
dp = [0] * (n + 1)
for i in range(n + 1):
    if i in a:
        dp[i] = 0
    else:
        if i == 0:
            dp[i] = 1
        elif i == 1:
            dp[i] = 1
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n])

"""
100 5
1
23
45
67
89
"""


### FIXED CODE ###

n, m = map(int, input().split())
A = set()
for i in range(m):
    a = int(input())
    A.add(a)
dp = [0] * (n + 1)
for i in range(n + 1):
    if i in A:
        dp[i] = 0
    else:
        if i == 0:
            dp[i] = 1
        elif i == 1:
            dp[i] = 1
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp[n])

"""
100 5
1
23
45
67
89
"""
n:int  = input()
s:int = 0
for i in range(0, int(n), 1):
    for j in range(0,int(i),2):
        s = s + 1
print(s)

### FIXED CODE ###

k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))
# -*- coding: utf-8 -*-
x, N = map(int, input().split())

if N != 0:
    p1, p2, p3, p4, p5 = map(int, input().split())
    num_list = [p1, p2, p3, p4, p5]

min_abs = 100
min_num = 0

for num in range(1, 101):
    if not num_list:
        min_num = x
        break
    if num in num_list:
        continue
    else:
        b = abs(num-x)
        if b < min_abs:
            min_abs = b
            min_num = num
            
print(min_num)

### FIXED CODE ###

# -*- coding: utf-8 -*-
x, N = map(int, input().split())

num_list = list(map(int, input().split()))

i = 0            
while True:
    a = x - i
    b = x +i
    if not a in num_list:
        min_num = a
        break
    elif not b in num_list:
        min_num = b
        break
    else:
        i += 1
            
print(min_num)
a = True
while a:
    l = map(int, list(input()))
    if l[0] != 0:
        print(sum(l))
    else:
        a = False


### FIXED CODE ###

a = True
while a:
    l = list(map(int, list(input())))
    if l[0] != 0:
        print(sum(l))
    else:
        a = False
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

using namespace std;
typedef long long ll;

ll MOD = 1e9 + 7;

vector<ll> factorial;
ll mod_exp(ll x, ll exp) {
    ll res = 1;
    ll base = x % MOD;
    while (exp) {
        if (exp % 2 == 1) {
            res = (res * base) % MOD;
        }
        base = (base * base) % MOD;
        exp /= 2;
    }
    return res;
}

ll nCk(ll n, ll k) {
    if (n < k) return 0;
    ll numerator = factorial[n];
    ll denominator = (factorial[n-k] * factorial[k]) % MOD;
    ll ans = (numerator * mod_exp(denominator, MOD-2)) % MOD;
    return ans;
}

int main() {
    ll N, K; cin >> N >> K;
    vector<ll> nums(N);
    for (ll& x : nums) {
        cin >> x;
    }

    factorial = {1};
    for (int i = 1; i <= N; i++) {
        factorial.push_back((factorial.back() * i) % MOD);
    }

    ll ans = 0;

    sort(begin(nums), end(nums), [](int a, int b){return a > b;});
    for (int i = 1; i <= N-K+1; i++) {
        ll best = nums[i-1];
        ll contribution = (best * nCk(N-i, K-1)) % MOD;
        ans = (ans + contribution) % MOD;
    }

    sort(begin(nums), end(nums));
    for (int i = 1; i <= N-K+1; i++) {
        ll best = nums[i-1];
        ll contribution = (best * nCk(N-i, K-1)) % MOD;
        ans = (ans - contribution) % MOD;
    }

    cout << ans << endl;
}


### FIXED CODE ###

MOD = 10**9 + 7

N, K = map(int, raw_input().split())
A = map(int, raw_input().split())

factorial = [1]
for i in range(1, N+1):
    factorial.append((i * factorial[-1]) % MOD)

def nCk(n, k):
    numerator = factorial[n]
    denominator = factorial[n-k] * factorial[k]
    return numerator * pow(denominator, MOD - 2, MOD)

ans = 0

A.sort()
for i in range(N-K+1):
    best = A[i]
    contribution = (best * nCk(N-i-1, K-1))
    ans = (ans - contribution) % MOD

A = A[::-1]
for i in range(N-K+1):
    best = A[i]
    contribution = (best * nCk(N-i-1, K-1))
    ans = (ans + contribution) % MOD

print ans
s=int(input())
k=int(input())

st=str(s)
l=len(st)
i=0
a=0
n=0
m=0

while n<1:
    if int(st[m])==1:
        m+=1
        a+=1
    else:
        n=1

if a>=k:
    print(1)

else:
    while i<=l:
        if int(st[i])!=1:
            print(int(st[i]))
            i=l+1
        else:
            i+=1

### FIXED CODE ###

s=int(input())
k=int(input())

st=str(s)
l=len(st)
i=0
a=0
n=0
m=0

while n<1:
    if int(st[m])==1:
        m+=1
        a+=1
    else:
        n=1
    if a==l:
        n=1

if a>=k:
    print(1)

else:
    while i<=l:
        if int(st[i])!=1:
            print(int(st[i]))
            i=l+1
        else:
            i+=1
x1,y1,x2,y2=map(int,input().split())

xd= x2-x1
yd= y2-y1

if xd >=0 and yd >= 0:
    x3 = x2 - abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 - abs(yd)
    y4 = y1 + abs(xd)

elif xd < 0 and yd > 0:

    x3 = x2 - abs(yd)
    y3 = y2 - abs(xd)
    x4 = x1 - abs(yd)
    y4 = y1 - abs(xd)

elif xd < 0 and yd < 0:

    x3 = x2 + abs(yd)
    y3 = y2 - abs(xd)
    x4 = x1 + abs(yd)
    y4 = y1 - abs(xd)

elif xd >0 and yd < 0:

    x3 = x2 + abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 + abs(yd)
    y4 = y1 + abs(xd)


print(x3,y3,x4,y4)


### FIXED CODE ###

x1,y1,x2,y2=map(int,input().split())

xd= x2-x1
yd= y2-y1

if xd >=0 and yd >= 0:
    x3 = x2 - abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 - abs(yd)
    y4 = y1 + abs(xd)

elif xd <= 0 and yd >= 0:

    x3 = x2 - abs(yd)
    y3 = y2 - abs(xd)
    x4 = x1 - abs(yd)
    y4 = y1 - abs(xd)

elif xd <= 0 and yd <= 0:

    x3 = x2 + abs(yd)
    y3 = y2 - abs(xd)
    x4 = x1 + abs(yd)
    y4 = y1 - abs(xd)

elif xd >= 0 and yd <= 0:

    x3 = x2 + abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 + abs(yd)
    y4 = y1 + abs(xd)


print(x3,y3,x4,y4)
a,b,h=map(int,input().split())

print((a+B)*h/2)

### FIXED CODE ###

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

print(round((a+b)*h/2))
def main():
    from itertools import product

    n, *xyh = map(int, open(0).read().split())
    a = range(101)

    if n - xyh[2::3].count(0) == 1:
        i = xyz[2:;
        3].index(1)
        print(xyh[i])
        return
    a = range(101)
    for x, y in product(a, a):
        l = None
        for i, j, h in zip(*[iter(xyh)] * 3):
            ll = h + abs(x - i) + abs(y - j)
            if l:
                if ll != l:
                    break
            else:
                l = ll
    else:
        print(x, y, l)
        return


if __ name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from itertools import product

    n, *xyh = map(int, open(0).read().split())
    a = range(101)

    if n - xyh[2::3].count(0) == 1:
        i = xyh[2::3].index(1)
        print(xyh[3*i], xyh[3*i+1], xyh[3*i+2])
        return
    a = range(101)
    for x, y in product(a, a):
        l = None
        for i, j, h in zip(*[iter(xyh)] * 3):
            if h == 0:
                continue
            ll = h + abs(x - i) + abs(y - j)
            if l:
                if ll != l:
                    break
            else:
                l = ll
        else:
            print(x, y, l)
            return


if __name__ == '__main__':
    main()
a, b = map(int, input().split())
if (a < b):
	print(???a < b???)
elif (a > b):
	print(???a > b???)
else:
	print(???a==b???)

### FIXED CODE ###

a, b = map(int, input().split())
if (a > b):
	print("a > b")
elif (a < b):
	print("a < b")
elif (a == b):
	print("a == b")
import math
a,b,c,d=map(int,input().split())

f1=math.gcd(c,d)
f2=c*d//f1

a=a-1
aa=a-a//c-a//d+a//f2
bb=b-b//c-b//d+b//f2

print(bb-aa)

### FIXED CODE ###

import fractions
a,b,c,d=map(int,input().split())

f1=fractions.gcd(c,d)
f2=c*d//f1

a=a-1
aa=a-a//c-a//d+a//f2
bb=b-b//c-b//d+b//f2

print(bb-aa)
def get_sum_arr(arr):
    sum_arr = [0]
    N = len(arr)
    for i in range(1,N+1):
        sum_arr.append(sum_arr[i-1] + arr[i-1])
    return sum_arr
def get_max_book_num(A,B,K):
    A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)
    count,i,j = 0,0,0
    for i in range(0,len(A_sum_arr)):
        if K < A_sum_arr[i]:
            break
        else:
            while (B_sum_arr[j] <= (K - A_sum_arr[i])) and (i < len(B_sum_arr)):
                j += 1
            j -= 1
        count = max(count,(i+j))
    return count

if __name__ == "__main__":
    N,M,K = list(map(int,input().split()))
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)
    print(get_max_book_num(A,B,K))
    


### FIXED CODE ###

def get_sum_arr(arr):
    sum_arr = [0]
    N = len(arr)
    for i in range(1,N+1):
        sum_arr.append(sum_arr[i-1] + arr[i-1])
    return sum_arr

def get_max_b(left_time,j,B_sum_arr):
    # [0,1,2,3,4,5]
    while B_sum_arr[j] > left_time and j > 0:
        j -= 1
    return j
def get_max_book_num(A,B,K):
    A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)
    count,i,j = 0,0,len(B_sum_arr)-1
    for i in range(0,len(A_sum_arr)):
        if K < A_sum_arr[i]:
            break
        else:
            left_time = K - A_sum_arr[i]
            j = get_max_b(left_time,j,B_sum_arr)
        count = max(count,(i+j))
    return count
if __name__ == "__main__":
    N,M,K = list(map(int,input().split()))
    A = list(map(int,input().split()))
    B = list(map(int,input().split()))
    print(get_max_book_num(A,B,K))
l,r = map(int, input().split())

t = []

if r-l >= 2019:
    print(0)
else:
    for i in range(l,r):
        for j in range(l+1,r+1):
            t.append((i*j)%2019)

print(min(t))

### FIXED CODE ###

l,r = map(int, input().split())

t = []

if r-l >= 2019:
    print(0)
else:
    for i in range(l,r):
        for j in range(l+1,r+1):
            t.append((i*j)%2019)
    print(min(t))
#B
A,B,K = map(int, input().split())

waru = []
for i in range(1, max(A,B)+1, 1):
    if len(waru) == K-1:
        break
    if A%i == 0 and B%i == 0:
        waru.append(i)
print(waru[-1])


### FIXED CODE ###

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

waru = []
for i in range(1, max(A,B)+1, 1):
    if A%i == 0 and B%i == 0:
        waru.append(i)
print(waru[-K])