Harryxun/stf_run huggingface dataset:
N = int(input())
data = [tuple(map(int, input().split())) for _ in range(N)]
data.sort(key=lambda x: x[2])
for cx in range(101):
    for cy in range(101):
        h0 = None
        for x, y, h in data:
            if h:
                if (h_tmp := h + abs(cx - x) + abs(cy - y)) != h0 and h0 is not None:
                    break
                h0 = h_tmp
            else:
                if abs(cx - x) + abs(cy - y) < h0:
                    break
        else:
            print(cx, cy, h0)
            exit()


### FIXED CODE ###

N = int(input())
data = [tuple(map(int, input().split())) for _ in range(N)]
data.sort(key=lambda x: -x[2])
for cx in range(101):
    for cy in range(101):
        h0 = None
        for x, y, h in data:
            if h:
                h_tmp = h + abs(cx - x) + abs(cy - y)
                if h_tmp != h0 and h0 is not None:
                    break
                h0 = h_tmp
            else:
                if abs(cx - x) + abs(cy - y) < h0:
                    break
        else:
            print(cx, cy, h0)
            exit()
#!/usr/bin/env python3
import sys
import functools,math


def solve(N: int, A: "List[int]"):
    L = [0] * (N+2)
    R = [0] * (N+2)

    L[1] = A[0]
    for i in range(2,N+1):
        L[i] = math.gcd(L[i-1], A[i-1])

    R[N] = A[N-1]
    for i in reversed(range(0,N+1)):
        R[i] = math.gcd(A[i-1], R[i+1])

    # print(L)
    # print(R)

    ans = 0
    for i in range(1,N):
        if(L[i-1] == 0):
            ans = max(ans, R[i+1])
        elif(R[i-1] == 0):
            ans = max(ans, R[i-1])
        else:
            ans = max(ans, math.gcd(L[i-1], R[i+1]))

    print(ans)

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import functools
# from math import gcd
# from fractions import gcd

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)
 
def solve(N: int, A: "List[int]"):
    L = [0] * (N)
    R = [0] * (N)
 
    for i in range(1, N):
        L[i] = gcd(L[i-1], A[i-1])
    for i in reversed(range(0,N-1)):
        R[i] = gcd(R[i+1], A[i+1])
 
    # print(L)
    # print(R)
 
    ans = 0
    for i in range(N):
        ans = max(ans, gcd(L[i], R[i]))
 
    print(ans)
 
    return
 
 
# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)
 
if __name__ == '__main__':
    main()
N , M =map(int,input())

keta_list=[]
num_list=[]
for x in range(M):
    s,c =map(int,input().split())
    keta_list.append(s)
    num_list.append(c)
siteilist=[0]*N
siteilist[0]=1
errer =0
apperlist =[]

for i,x in enumerate(keta_list):
    siteilist[x-1]=num_list[i]
    if x == 1 and num_list[i]==0:
        errer= 1
    if x in apperlist:
        z =[]
        z = [l for l,i in enumerate(keta_list) if x == i ]
        if len(z)!=0:
            firest = num_list[z[0]]
            for b in z:
                if num_list[b] != firest:
                    errer = 1
                    
    apperlist.append(x)
out =0
if errer ==1:
    out =-1
else:
    for x in range(N):
        out += siteilist[x]*10**(N-x-1)
print(out)

### FIXED CODE ###

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

keta_list=[]
num_list=[]
for x in range(M):
    s,c =map(int,input().split())
    keta_list.append(s)
    num_list.append(c)
siteilist=[0]*N
if len(siteilist)!=1:
    siteilist[0]=1
errer =0
apperlist =[]

for i,x in enumerate(keta_list):
    siteilist[x-1]=num_list[i]
    if x == 1 and num_list[i]==0 and len(siteilist)!=1:
        errer= 1
    if x in apperlist:
        z =[]
        z = [l for l,i in enumerate(keta_list) if x == i ]
        if len(z)!=0:
            firest = num_list[z[0]]
            for b in z:
                if num_list[b] != firest:
                    errer = 1
                    
    apperlist.append(x)
out =0
if errer ==1:
    out =-1
else:
    for x in range(N):
        out += siteilist[x]*10**(N-x-1)
print(out)
import numpy as np

a, b = map(str, input().split())

n = int(a+b)
sq = np.aqrt(n)
if sq == int(sq):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import numpy as np

# a = '1'; b = '21'
a, b = map(str, input().split())

n = int(a+b)
sq = np.sqrt(n)
if sq == int(sq):
    print('Yes')
else:
    print('No')
import math

N = int(input())
A = [int(a) for a in input().split(" ")]
ave = sum(A) / N
can1 = math.floor(ave)
can2 = math.ceil(ave)

cost1 = sum([(a - can1) ** 2 for a in A])
cost2 = sum([(a - can2) ** 2 for a in A])
print(min[cost1, cost2])

### FIXED CODE ###

import math
 
N = int(input())
A = [int(a) for a in input().split(" ")]
ave = sum(A) / N
can1 = math.floor(ave)
can2 = math.ceil(ave)
 
cost1 = sum([(a - can1) ** 2 for a in A])
cost2 = sum([(a - can2) ** 2 for a in A])
print(min([cost1, cost2]))
a,b=map(int,input().split())
c=0
for i range(a,b+1):
  if str(i)[::0] == str(i):
    c += 1
print(c)

### FIXED CODE ###

a,b=map(int,input().split())
c=0
for i in range(a,b+1):
  if str(i)[::-1] == str(i):
    c += 1
print(c)
a, b, c = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
area = int((a*b)/2)
print(area)

### FIXED CODE ###

inp = input()
ab, bc, ca = [int(n) for n in inp.split()]
print(int(ab*bc/2))
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
q = int(input())

for _ in range(q):
  b,c = map(int, input().split())
  if b in a:
    ans = 0
    t = a.pop(b)
    if c in a:
      a[c] += t
    else:
      a[c] = t
    for x,y in a.items():
      ans += x*y
    print(ans)
  else:
    print(ans)

### FIXED CODE ###

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

ans = sum(a)
nums = [0]*(10**5+1)
for i in a: nums[i] += 1

for _ in range(q):
  b,c = map(int, input().split())
  if nums[b] > 0:
    ans -= b*nums[b]
    nums[c] += nums[b]
    ans += c*nums[b]
    print(ans)
    nums[b] = 0
  else:
    print(ans)
x = int(input())

s = set([1])
for i in range(2,501):
    for j in range(2,10):
        if (i**j) <= x:
            s.add(i**j)

print(max(list(s)))

### FIXED CODE ###

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

if abs(a-c) <= d or max(abs(a-b), abs(b-c)) <= d:
    print('Yes')
else:
    print('No')
a, b, c=input().split()
if 'a < b < c' :
    print( 'Yes' )
    elif :
        print( 'No' )


### FIXED CODE ###

a, b, c=input().split()
if a < b < c :
    print('Yes')
else :
    print('No')
s=int(input())
w=int(input())
print('unsafe' if w>=s else 'safe')

### FIXED CODE ###

s,w=map(int,input().split())
print('unsafe' if w>=s else 'safe')
N, Q = map(int,input().split())
S = list(input())
'''
dp[i]: 1 ~ i 番目までにacが何個あるのか　
 dp[i+1] = dp[i] (S[i]=="A" and S[i+1] == "C")
         = dp[i] (else)
'''
dp = [0 for i in range(N+10)]
for i in range(1,N+1):
    if S[i-1] == "A" and S[i] == "C" :
        dp[i] = dp[i-1] + 1
    else :
        dp[i] = dp[i-1]

for i in range(Q) :
    a,b = map(int,input().split())
    print("{}".format(dp[b-1]-dp[a-1]))

### FIXED CODE ###

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

dp = [float("inf") for i in range(N)]
dp[0] = 0
for i in range(1,N):
    if S[i-1] == "A" and S[i] == "C" :
        dp[i] = dp[i-1] + 1
    else :
        dp[i] = dp[i-1]
val = [[] for i in range(Q)]
for i in range(Q) :
    a,b = map(int,input().split())
    val[i] = [a-1,b-1]
for i in range(Q):
    print("{}".format(dp[val[i][1]]-dp[val[i][0]]))
# ABC109C - Skip
from math import gcd

n, x = list(map(int, input().rstrip().split()))
lst = list(map(int, input().rstrip().split()))
d = abs(x - lst[0])
for i in range(n):
    dif = abs(x - lst[i])
    if dif % d == 0:
        continue
    else:
        d = gcd(d, dif)
print(d)

### FIXED CODE ###

# ABC109C - Skip
def gcd(a, b):
    while a:
        a, b = b % a, a
    return b
        

n, x = list(map(int, input().rstrip().split()))
lst = list(map(int, input().rstrip().split()))
d = abs(x - lst[0])
for i in range(n):
    dif = abs(x - lst[i])
    if dif % d == 0:
        continue
    d = gcd(d, dif)
print(d)
X = int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

for i in range(len(make_divisors(X))):
    A = make_divisors(X)[i]
    for j in range(-int(X**(1/5)),int(X**(1/5))):
        if (A+j)**5-j**5==X:
            a = j + A
            b = j
            break
        else:
            continue
        break
    else:
        continue
    break
print(a,b)

### FIXED CODE ###

X = int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

for i in range(len(make_divisors(X))):
    A = make_divisors(X)[i]
    for j in range(-64,119):
        if (A+j)**5-j**5==X:
            a = j + A
            b = j
            break
        else:
            continue
        break
    else:
        continue
    break
print(a,b)
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

count = 0
for i in range(N):
    if V[i] > C[i]:
        count += V[i] - C[i]

print (count)

### FIXED CODE ###

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

N = T // A
print(N*B)
L,R=map(int,input().split())
M=2019
for i in range(L,R):
    for j in range(i+1,R+1) :
        if (i*j)%2019 < M :
            M = (i*j)%2019
print (M)



### FIXED CODE ###

N, A, B = map(int,input().split())
if B<N*A :
    print(B)
else :
    print(N*A)
str = input()

day = {"MON":1, "TUE":2, "WED":3, "THU":4, "FRI":5, "SAT":6 "SUN":7}

print(day["SUN"]() - day[str]())

### FIXED CODE ###

str = input()
 
day = {"MON":1, "TUE":2, "WED":3, "THU":4, "FRI":5, "SAT":6, "SUN":7}
 
if str == "SUN":
    print(7)
else:
    print(day["SUN"] - day[str])
antenas = list(int(input()) for i in range(5))

k = int(input)

if (antenas[4] - antenas[0]) <= k:
  print("Yay!")
else :
  print(":(")


### FIXED CODE ###

antenas = [int(input()) for i in range(5)]

k = int(input())

if (antenas[4] - antenas[0]) <= k:
  print("Yay!")
else :
  print(":(")
import sys,math

def solve():
    a, = map(int,input().split())
    print(a**2*math.pi ,a*2*math.pi)
    
solve()


### FIXED CODE ###

import sys,math

def solve():
    a = float(input())
    print(a**2*math.pi ,a*2*math.pi)
    
solve()
x ** 3 == i:
 print(i)

### FIXED CODE ###

x = input()
print(int(x) ** 3)
import sys
N,M=map(int,input().split())
A = list( map(int,input().split()) )
for i in range(N): A[i] = A[i]//2


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

# 全Aが2で和切れる数が等しいか確認
cnt = 1
while A[0]%(1<<cnt) == 0 :
    cnt += 1
for i in range(1,N):
    if (A[i]%(1<<cnt) == 0) or (A[i]%(1<<(cnt-1)) != 0):
        print(0)
        sys.exit()

a = A[0]
b = A[1]
A.append(1)
lcm = a * b // GCD(a,b)
#print(lcm)
if lcm > M:
    print(0)
    sys.exit()
for i in range(2,N):
    a = lcm
    b = A[i]
    lcm = a * b // GCD(a,b)
    if lcm > M:
        print(0)
        sys.exit()
print( (M+lcm+1) // (lcm*2) )



### FIXED CODE ###

import sys
N,M=map(int,input().split())
A = list( map(int,input().split()) )
for i in range(N): A[i] = A[i]//2


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

# 全Aが2で割り切れる数が等しいか確認
cnt = 1
while A[0]%(1<<cnt) == 0 :
    cnt += 1
for i in range(1,N):
    if (A[i]%(1<<cnt) == 0) or (A[i]%(1<<(cnt-1)) != 0):
        print(0)
        sys.exit()

A.append(1)
a = A[0]
b = A[1]
lcm = a * b // GCD(a,b)
#print(lcm)
if lcm > M:
    print(0)
    sys.exit()
for i in range(2,N):
    a = lcm
    b = A[i]
    lcm = a * b // GCD(a,b)
    if lcm > M:
        print(0)
        sys.exit()
print( (M+lcm) // (lcm*2) )
s=input()
q=int(input())
s=[]
r=[]
for i in S:
    s.append(i)
t=1
for i in range(q):
    qv=list(input().split())
    if qv[0]=='1':
        t^=1
    else:
        if int(qv[1])^t==0 or int(qv[1])^t==2:
            r.append(qv[2])
        else:
            s.append(qv[2])
            
if t==0:
    ss=s.copy()
    s=[]
    for j in range(len(ss)):
        s.append(ss[-1-j])
    ans=s
    ans.extend(r)
else:
    rr=r.copy()
    r=[]
    for j in range(len(rr)):
        r.append(rr[-1-j])
    ans=r
    ans.extend(s)
answer=''.join(ans)
print(answer)

### FIXED CODE ###

S=input()
q=int(input())
s=[]
r=[]
for i in S:
    s.append(i)
t=1
for i in range(q):
    qv=list(input().split())
    if qv[0]=='1':
        t^=1
    else:
        if int(qv[1])^t==0 or int(qv[1])^t==2:
            r.append(qv[2])
        else:
            s.append(qv[2])
            
if t==0:
    ss=s.copy()
    s=[]
    for j in range(len(ss)):
        s.append(ss[-1-j])
    ans=s
    ans.extend(r)
else:
    rr=r.copy()
    r=[]
    for j in range(len(rr)):
        r.append(rr[-1-j])
    ans=r
    ans.extend(s)
answer=''.join(ans)
print(answer)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()
h = [INT() for _ in range(N)]
h.sort(reverse = True)

def is_ok(x):
    h_copy = h[:]
    for i in range(N):
        h_copy[i] -= B*x
    cnt = 0
    for i in range(N):
        cnt += max(0, ceil(h_copy[i]/(A-B)))
    return cnt <= x

while l+1 != r:
	p = -(-l-r)//2
	if is_OK(p):
		r = p
	elif is_OK(p)==0:
		l = p


if is_OK(p):
	print(p)
else:
	print(p+1)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()
h = [INT() for _ in range(N)]
h.sort(reverse = True)

def is_OK(T):
	H = h.copy()
	H = [x-B*T for x in h]
	tmp = 0
	for x in H:
		tmp += max(0, -(-x//(A-B)))
		if T < tmp:
			return 0
			break
	else:
		return 1
l = 0
r = -(-max(h)//B)
p = -(-l-r)//2
while l+1 != r:
	p = -(-l-r)//2
	if is_OK(p):
		r = p
	elif is_OK(p)==0:
		l = p

if is_OK(p):
	print(p)
else:
	print(p+1)
n=int(input())
s=input()
ans="No"
if n%2==0 and s[:n//2+1]==s[n//2+1]:
    ans="Yes"
print(ans)

### FIXED CODE ###

n=int(input())
s=input()
ans="No"
if n%2==0 and s[:n//2]==s[n//2:]:
    ans="Yes"
print(ans)
from sys import stdin, setrecursionlimit


def main():
    n, k = map(int, stdin.readline().split())
    p = list(map(int, stdin.readline().split()))

    sp = [0] * 1001

    for i in range(1, 1001):
        sp[i] = sum(range(i + 1)) / i

    max = 0
    max_index = 0

    for i in range(n - k + 1):
        tmp = 0
        for i in range(i, i + k):
            tmp += p[i]
        if tmp > max:
            max = tmp
            max_index = i

    ans = 0
    for i in range(max_index, max_index + k):
        ans += sp[p[i]]

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

### FIXED CODE ###

from sys import stdin, setrecursionlimit


def main():
    n, k = map(int, stdin.readline().split())
    p = list(map(int, stdin.readline().split()))

    sp = [0] * 1001

    for i in range(1, 1001):
        sp[i] = sum(range(i + 1)) / i

    summary = [0] * n
    summary[0] = sp[p[0]]
    for i in range(1, n):
        summary[i] = summary[i - 1] + sp[p[i]]

    max = summary[k - 1]
    for i in range(k, n):
        tmp = summary[i] - summary[i - k]
        if tmp > max:
            max = tmp
    print(max)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
#!/usr/bin/python

import sys

num_list = []

while 1:
  if num=raw_input() is not "0 0":
    num_list.append(num.split(" "))

for x in range(len(num_list)):
  wide = "" 
  for i in range(int(num_list[x][1])):
    wide += "#"  
  for i in range(int(num_list[x][0])):
    print wide

sys.exit()

### FIXED CODE ###

while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w == 0:
        break
    print(("#" * w + "\n") * h)
import array
n = int(input())
a = [int(input()) for _ in range(n)]
[print((max(array.array('H', (a[:_] + a[_ + 1:]))))) for _ in range(n)]


### FIXED CODE ###

import copy
n = int(input())
a = [int(input()) for _ in range(n)]
b = sorted(copy.copy(a), reverse=True)

for i in range(n):
    if a[i] == b[0]:
        print(b[1])
    else:
        print(b[0])
s=input()

ans=0
dd=[]

fir=int(s[0])*1000+int(s[1])*100+int(s[2])*10+int(s[3])
dd.append(fir%673)
for i in range(4,len(s)):
    tmp=(dd[i-4]*10+int(s[i]))%673
    dd.append(tmp)

class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)

    def sum(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s

    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i

bit=Bit(len(dd))
for i in range(1,len(dd)+1):
    bit.add(i,dd[i-1])
#print(dd)
for i in range(1,len(dd)):
    for j in range(i+1,len(dd)+1):
        if (bit.sum(j)-bit.sum(i))%673==0 and (bit.sum(j)-bit.sum(i))%3==0 :
            ans+=1


print(ans)



### FIXED CODE ###

s=input()[::-1]

count=[0]*2019
count[0]+=1
sd=0
d=1
for c in s:
   sd+=int(c)*d
   sd%=2019
   d*=10
   d%=2019
   count[sd]+=1

ans=0
for cnt in count:
    ans+=cnt*(cnt-1)//2

print(ans)
import re

di = {1:".,!? ",2:"abc",3:"def",4:"ghi"
         ,5:"jkl",6:"mno",7:"pqrs",8:"tuv",9:"wxyz"}
while True:
    str = ""
    line = raw_input()
    if line.endswith("0") is False:
        break
    list = re.split("0+",line)
    for line in list:
        if line is not '':
            index = (len(line)-1)%len(di[int(line[:1])])
            first_num = int(line[:1])
            str += di[first_num][index]
    print str

### FIXED CODE ###

import sys
di = {1:".,!? ",2 :"abc",3:"def",4:"ghi",5:"jkl",6:"mno",7:"pqrs",8:"tuv",9:"wxyz"}
b = input()

for j in range(b):
    a = raw_input()
    count = 0
    le = 999
    for letter in a:
        if(letter == "0"):
            if(le == 999):
                pass
            else:
                sys.stdout.write(di[le][(count-1)%len(di[le])])
                count = 0
                le = 999
        else:
            le = int(letter)
            count += 1
    print ""
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        sys.exit()
print('YES')


### FIXED CODE ###


q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

dic = {}

for k in x :
    if k in dic.keys() :
        dic[k] += 1
    else :
        dic[k] = 1
    
for i in y :
    if i in dic.keys() :
        dic[i] -= 1
        if dic[i] == -1 :
            print('NO')
            exit()
    else :
        print('NO')
        exit()
print('YES')
n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y=map(int,input().split())
  if x*x+y+y<=d*d:
    cnt+=1
  else:
    continue
print(cnt)


### FIXED CODE ###

x=int(input())
if x>=30:
  print("Yes")
else:
  print("No")
input_list = input().split()
a = int(input_list[2])
b = int(input_list[0])
c = int(input_list[1])
print("{} {} {}".format(a, b, c)

### FIXED CODE ###

input_list = input().split()
a = int(input_list[2])
b = int(input_list[0])
c = int(input_list[1])
print("{} {} {}".format(a, b, c))
n = int(input())
ls = map(int, input().split())

from itertools import combinations

combi = list(combinations(ls, 2))

s = 0
for a, b in combi:
    s += (a * b)

print(s

### FIXED CODE ###

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

from itertools import combinations

combi = list(combinations(ls, 2))

s = 0
for a, b in combi:
    s += (a * b)

print(s)
N = int(input())
P = list(map(int, input().split()))
 
left_bigger  = [0] + [i for i in range(N+1)]
right_bigger = [i+1 for i in range(N+1)] + [N+1]
 
E = [(v, i+1) for i, v in enumerate(P)]
E.sort()

ans = 0
for v,i in E:
    l0=left_bigger[i]
    l1=left_bigger[l0]
    r0=right_bigger[i]
    r1=right_bigger[r0]
    print(left_bigger)
    ans += ((r1-r0)*(i-l0) + (r0-i)*(l0-l1))*v
    left_bigger[r0]=l0
    right_bigger[l0]=r0
print(ans)




### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
 
left_bigger  = [0] + [i for i in range(N+1)]
right_bigger = [i+1 for i in range(N+1)] + [N+1]
 
E = [(v, i+1) for i, v in enumerate(P)]
E.sort()

ans = 0
for v,i in E:
    l0=left_bigger[i]
    l1=left_bigger[l0]
    r0=right_bigger[i]
    r1=right_bigger[r0]
    ans += ((r1-r0)*(i-l0) + (r0-i)*(l0-l1))*v
    left_bigger[r0]=l0
    right_bigger[l0]=r0
print(ans)
N = int(input())
A = list(map(int,input().split()))
ans = 1

if 0 in A:
    ans = 0
else:
    for a in A:
        ans *= a
    if ans > 1000000000000000000:
        ans = -1
        return
print(ans)

### FIXED CODE ###

def main():
    N =int(input())
    A =list(map(int,input().split()))
    if 0 in A:
        print(0)
        return
    prod = 1
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
main()
import math
def result(n):
    lists = list()
    num = n
    for i in range(2, int((n**0.5//1))+1):
        if num%i==0:
            time=0
            while num%i==0:
                num //= i
                time+=1
            if not i in lists:
                lists.append(i)
    if num!=1:
        if not num in arr:
                lists.append(num)
    return lists
A , B = list(map(int,input().split()))
print(len(result(math.gcd(A,B)))+1)

### FIXED CODE ###

from fractions import gcd
def result(n):
    lists = list()
    num = n
    for i in range(2, int((n**0.5//1))+1):
        if num%i==0:
            time=0
            while num%i==0:
                num //= i
                time+=1
            if not i in lists:
                lists.append(i)
    if num!=1:
        if not num in lists:
                lists.append(num)
    return lists
A , B = list(map(int,input().split()))
print(len(result(gcd(A,B)))+1)