Harryxun/stf_run huggingface dataset:
n,p = map(int,input().split())
if n==1:
 return p
def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
a = primes(int(p**(1/n)))
res = 1
for j in range(len(a)):
 q = p
 if q%int(a[j]**n) == 0:
  c = 0
  while q%int(a[j]**n) == 0:
   q /= (a[j]**n)
   c += 1
  res *= int(a[j]**c)
print(res)

### FIXED CODE ###

n,p = map(int,input().split())
if n == 1:
  print(p)
  exit()
a = 1
for k in range(2,1000001):
  c = 0
  while p%k == 0:
    p = p//k
    c += 1
  a *= k**(c//n)
  if p == 1:
    break
print(a)
from collections import Counter

class UnionFindBasic():
    """via https://note.nkmk.me/python-union-find/#_3
    """
    def __init__(self, n):
        self.parents = list(range(n))

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

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y: return
        self.parents[y] = x

if __name__ == '__main__':
    N, M = map(int, input().split())

    uf = UnionFindBasic(N)

    for _ in range(M):
        a,b = list(map(lambda x: int(x)-1, input().split()))
        if a < b:
            uf.union(a,b)
        else:
            uf.union(b,a)

    print(Counter(uf.parents).most_common()[0][1])

### FIXED CODE ###

# from pprint import pprint
#
# N, M = map(int, input().split())
#
# G = [[0 for _ in range(N)] for _ in range(N)]
#
# for _ in range(M):
#     a, b = list(map(int, input().split()))
#     G[a-1][b-1] = G[b-1][a-1] = 1
#
# pprint(sum(sum(g) for g in G) // 2)

from collections import Counter

class UnionFindBasic():
    """via https://note.nkmk.me/python-union-find/
    """
    def __init__(self, n: int):
        # < 0 は根
        self.n = n
        self.parents = [-1] * n

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

    def union(self, x: int, y: int):
        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 main():
    N, M = map(int, input().split())

    if M == 0:
        print(1)
        return

    uf = UnionFindBasic(N)

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

    ans = 0
    for i in range(N):
        ans = max(ans, uf.size(i))
    print(ans)

if __name__ == '__main__':
    main()
N = int(input())
X = list(map(int, input().split()))
 
s_X = sorted(X)
miX = s_X[N//2]
mi1X = s_X[N//2 + 1]
 
for a in X:
  if(s_X.index(a)<=N//2):
    print(mi1X)
  else:
    print(miX)

### FIXED CODE ###

# import copy

N = int(input())
X = list(map(int, input().split()))
# S_X = copy.copy(X)
S_X = sorted(X)
miX = S_X[N // 2 - 1]
mi1X = S_X[N // 2]
# print(S_X, X)
# print(miX, mi1X)

# print(miX, mi1X)
# print(X)
for a in X:
    if(a <= miX):
        print(mi1X)
    else:
        print(miX)
print(int(input)**2-int(input()))

### FIXED CODE ###

print(int(input())**2-int(input()))
a,b,c = int(input().split())

i = 0

if a+b==c:
  i += 1
if b+c==a:
  i += 1
if c+a==b:
  i += 1
  
if i ==1:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]

i = 0

if a+b==c:
  i += 1
if b+c==a:
  i += 1
if c+a==b:
  i += 1
  
if i ==1:
  print('Yes')
else:
  print('No')
input()
A = list(map(int, input().split()))
N = len(A)

def gcd(x, y):
  while y != 0:
    x, y = y, x%y
  return x


if N <= 2:
  print(max(A))
else:
  max = 0
  for i in range(N):
    temp = A.pop(0)
    ans = gcd(A[0], A[1])
    for j in A[1:]:
      ans = gcd(ans, j)
    if max < ans:
      max = ans
    A.append(temp)
  print(max)

### FIXED CODE ###

l = list(map(int, input().split()))
print((l[2] // l[0]) * l[1], "")
N, K = map(int, input().split())
a = [0]*n
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for l in A:
        a[l-1] = 1
print(a.count(0))


### FIXED CODE ###

N, K = map(int, input().split())
a = [0]*N
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for l in A:
        a[l-1] = 1
print(a.count(0))
from operator import itemgetter

city_point_list = []
N = int(input())
for i in range(N):
    c, p = input().split()
    city_point_list.append(c, int(p))

cp_num_dict = {}
for i in range(city_point_list):
    cp_num_dict[city_point_list[i]] = i + 1

point_sort_rev = sorted(city_point_list, key=itemgetter(1), reverse=True)
city_sort = sorted(point_sort_rev, key=itemgetter(0))

for cp in city_sort:
    print (cp_num_dict[cp])

### FIXED CODE ###

# -*- coding: utf-8 -*-

from operator import itemgetter

N = int(input())
SP_list = []
SP_dict = {}
for i in range(N):
    name, point = input().split()
    pair = (name, int(point))
    SP_list.append(pair)
    SP_dict[pair] = i + 1

for i in range(len(SP_list)):
    SP_dict[SP_list[i]] = i + 1

point_sorted = sorted(SP_list, key=itemgetter(1), reverse=True)
name_sorted = sorted(point_sorted, key=itemgetter(0))

for pair in name_sorted:
    print (SP_dict[pair])
h, n = map(int, input().split())
2.ab = [list(map(int, input().split())) for _ in range(n)]
3.dp =[0]*(h+max(ab[0:n][0]))
4.for i in range(1, h+1):
5.  dp[i] = min(dp[i-a]+b for a,b in ab)
6.print(dp[h])

### FIXED CODE ###

def main():
    h, n = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(n)]
    dp =[0]*(h+max(a for a,b in ab))
    for i in range(1, h+1):
        dp[i] = min(dp[i-a]+b for a,b in ab)
    print(dp[h])
      
if __name__ == '__main__':
    main()
a = int(input())
si_1 = [str(a)[i]=='1' for i in range(3)]
print(si_1.count(True))

### FIXED CODE ###

a = str(input())
si_1 = [a[i]=='1' for i in range(3)]
print(si_1.count(True))
n,m = map(int,input().split())
if n > 1:
    ns = list('1' + '0'*(n-1))
else:
    ns = list('0')

ss, cc = -1, -1
for i in range(m):
    s, c = map(int, input().split())
    if s == ss and c != cc:
        x = False
        break
    ns[s-1] = str(c)
    ss, cc = s, c
    
if (len(ns) > 1 and ns[0] == '0') or x == False:
    ans = -1
else:
    ans = ''.join(ns)
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
if n > 1:
    ns = list('1' + '0'*(n-1))
else:
    ns = list('0')

ss, cc = -1, -1
for i in range(m):
    s, c = map(int, input().split())
    if s == ss and c != cc:
        ns[0] = '-1'
        break
    ns[s-1] = str(c)
    ss, cc = s, c
    
if (len(ns) > 1 and ns[0] == '0') or ns[0] == '-1':
    ans = -1
else:
    ans = ''.join(ns)
print(ans)
# -*- coding: utf-8 -*-
# ITP1_10_A

import math

pos = list(map(int, input().split()))
x = abs(pos[2] - pos[0])
y = abs(pos[3] - pos[1])

print(math.sqrt(x**2 + y**2))



### FIXED CODE ###

# -*- coding: utf-8 -*-
# ITP1_10_A

import math

pos = list(map(float, input().split()))
x = abs(pos[2] - pos[0])
y = abs(pos[3] - pos[1])

print(math.sqrt(x**2 + y**2))
s=input();
ans =0
for n in set(i for i in s[2::]):
  if s.count(n)==2:
    ans+=1
print('Yes' if ans>1 else 'No'

### FIXED CODE ###

s=input()[2::];print('Yes' if len(set(s[:2]))==1 and len(set(s[2:]))==1 else 'No')
N = int(input())
P = list(map(int, input().split()))
ans = 0
for i in range(N):
    partP = P[:i+1]
    flag = True 
    partP.sort()[::-1]
    for p in partP:
        if P[i] <= p:
            continue
        else:
            flag = False
            break
    if flag:
        ans += 1

print(ans)

### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
ans =1 
newP = P[0]
for i in range(1, N):
    newP = (min(newP, P[i]))
    if newP == P[i]:
        ans += 1

print(ans)
A = map(int, input().split())
if A.sort() = [5,7,7]:
  print("YES")
eles:
  print("NO")


### FIXED CODE ###

A = list(map(int, input().split()))
A.sort()
if A == [5,5,7]:
  print("YES")
else:
  print("NO")
a, b, c = list(input().split(' '))
if a[-1] = b[0] and b[-1] = c[0]:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

a, b, c = list(input().split(' '))
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')
import math
n=int(input())
a=[int(input()) for i in range(n)]
m=min(a)
w=math.ceil(n/m)
print(w+4)

### FIXED CODE ###

import math

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

print(4+math.ceil(n/min(a)))
N, M = map(int, input().split())
A = list([int(input()) for i in range(M)])

stairs = [1] * (N+1)
for i in reversed(range(N+1)):
    if i in A:
        stairs[i] = 0
        continue

    one_step, two_step = 1, 0
    if stairs[i+1:i+2]:
        one_step = stairs[i+1]
    if stairs[i+2:i+3]:
        two_step = stairs[i+2]

    stairs[i] = one_step + two_step
print(stairs[0] % 1_000_000_007)

### FIXED CODE ###

import sys
max_num = 1000000007
input = sys.stdin.readline
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]

stairs = [1] * (N+1)
for i in A:
    stairs[i] = 0

for i in range(1, N):
    if stairs[i+1] != 0:
        stairs[i+1] = stairs[i] + stairs[i-1]
print(stairs[N] % max_num)
A,B,X = map(int,input().split())
mn = -(-A//X)
mx = B//X
if A == B :
    if A % X == 0:
        prnt(1)
    else:
        print(0)
else:
    print(mx - mn + 1)

### FIXED CODE ###

a,b,x=map(int, input().split())
i = a//x
j = b//x
if a%x==0:
    print(j-i+1)
else:
    print(j-i)
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

n=n_in()

base=[]

for _ in range(n):
    s = s_in()

    c = s[0]
    cnt = 1
    ar = []
    for t in range(1,len(s)):
        if s[t-1] == s[t]:
            cnt += 1
        else:
            ar.append((c,cnt))
            c = s[t]
            cnt = 1
    ar.append((c,cnt))

    start = 0
    if ar[0][0] == ")":
        start = 1

    r = 0 # ( の数
    sgn = 1
    for c,cnt in ar[start:]:
        r += sgn*cnt
        sgn *= -1


    res = ()
    if ar[0][0] == ")":
        if r >= 0:
            res = (ar[0][1], r)
        else:
            res = (ar[0][1]-r,0)
    else:
        if r >= 0:
            res = (0, r)
        else:
            res = (r, 0)

    base.append(res)

i_cnt = 0
j_cnt = 0

base2 = []

for i,j in base:
    i_cnt += i
    j_cnt += j

    if j > 0:
        base2.append((i,-(j-i),j))

if i_cnt != j_cnt:
    print("No")
    exit()

base2.sort()

current = 0


for i,p,j in sorted(filter(lambda x: x[1] <= 0 ,base2)):
    if current < i:
        print("No")
        exit()
    current -= i
    current += j

base3 = []
for i,p,j in filter(lambda x: x[1] > 0 ,base2):
    base3.append((p,i,j))

base3.sort()

for p,i,j in base3:
    if current < i:
        print("No")
        1/0
        exit()
    current -= i
    current += j
    
print("Yes")
        


### FIXED CODE ###


import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

n=n_in()

base=[]

for _ in range(n):
    s = s_in()

    c = s[0]
    cnt = 1
    ar = []
    for t in range(1,len(s)):
        if s[t-1] == s[t]:
            cnt += 1
        else:
            ar.append((c,cnt))
            c = s[t]
            cnt = 1
    ar.append((c,cnt))

    start = 0
    if ar[0][0] == ")":
        start = 1

    r = 0 # ( の数
    sgn = 1
    for c,cnt in ar[start:]:
        r += sgn*cnt
        sgn *= -1


    res = ()
    if ar[0][0] == ")":
        if r >= 0:
            res = (ar[0][1], r)
        else:
            res = (ar[0][1]-r,0)
    else:
        if r >= 0:
            res = (0, r)
        else:
            res = (-r, 0)

    base.append(res)

i_cnt = 0
j_cnt = 0

base2 = []

for i,j in base:
    i_cnt += i
    j_cnt += j

    if j > 0:
        base2.append((i,-(j-i),j))

if i_cnt != j_cnt:
    print("No")
    exit()

base2.sort()

current = 0


for i,p,j in sorted(filter(lambda x: x[1] <= 0 ,base2)):
    if current < i:
        print("No")
        exit()
    current -= i
    current += j

base3 = []
for i,p,j in filter(lambda x: x[1] > 0 ,base2):
    base3.append((p,i,j))

base3.sort()

for p,i,j in base3:
    if current < i:
        print("No")
        exit()
    current -= i
    current += j
    
print("Yes")
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
 
n, m = na()
g = [[False] * n for _ in range(n)]
gs = [[] for _ in range(n)]
for i in range(m):
    s, t = na()
    gs[s-1].append(t-1)
    g[s-1][t-1] = True
 
ans = 999999
best = None
for i in range(n):
    ds = [9999999] * n
    prevs = [-1] * n
    ds[i] = 0
    q = [i]
    qp = 0
    while qp < len(q):
        cur = q[qp]
        qp += 1
        for e in gs[cur]:
            if ds[e] > ds[cur] + 1:
                ds[e] = ds[cur] + 1
                prevs[e] = cur
                q.append(e)
    for j in range(n):
        if g[j][i]:
            if ds[j] + 1 < ans:
                ans = ds[j] + 1
                best = [0] * (ds[j]+1)
                best[0] = i
                cur = j
                r = -1
                while cur != i:
                    best[r] = cur
                    r -= 1
                    cur = prevs[cur]
 
if not best:
    print(-1)
else:
    print(ans)
    for x in best:
        print(x+1)

### FIXED CODE ###

N = int(input())
 
ans = 0
for i in range(1, N+1):
    if i % 2 == 1:
        ans += 1
print(ans/N)
N,M,R = map(int,input().split())
r = map(int,input().split())
from itertools import permutations
from functools import reduce
import numpy as np
t = np.zeros((M+1,M+1))

for i in range(M):
    a,b,c = map(int, input().split())
    t[a][b] = c
    t[b][a] = c

def cost(l):
    last = len(l) - 1
    ret = 0
    for i,j in enumerate(l):
        if i == last:
            return ret
        ret += t[j][l[i+1]]
        
print(int(min([cost(p) for p in permutations(r)])))


### FIXED CODE ###

N,M,R = map(int,input().split())
r = list(map(int,input().split()))
from itertools import permutations
from scipy.sparse.csgraph import dijkstra
t = [[float('inf') for i in range(N)] for j in range(N)]

for i in range(M):
    a,b,c = map(int, input().split())
    t[a-1][b-1] = t[b-1][a-1] = c
t=dijkstra(t).astype(int)
def c(l):
    ret = 0
    for i in range(R-1):
        ret += t[l[i]-1][l[i+1]-1]
    return ret

print(min([c(i) for i in permutations(r)]))
import sys,math,collections,itertools
input = sys.stdin.readline

N = int(input())
imo = []
xlmin = 0
xlmax = 0
for _ in range(N):
    x,l = map(int,input().split())
    imo.append([x-l,x+l])
    xlmin = min(xlmin,x-l)
    xlmax = max(xlmax,x+l)

point = [0]*(xlmax-xlmin+2)

for i in range(N):
    point[imo[i][0]-xlmin+1] += 1
    point[imo[i][1]-xlmin+1] -= 1

now = 0
cnt = 0
befor = 0
for i in range(len(point)):
    before = now
    now += point[i]
    if point[i]>=1 and now >1:
        cnt += now-before

print(N-cnt)


### FIXED CODE ###

import sys
input = sys.stdin.readline

N = int(input())
imo = []
xlmin = 0
xlmax = 0
for _ in range(N):
    x,l = map(int,input().split())
    imo.append([x-l,x+l-1])
imo = sorted(imo,key = lambda x: x[1])
cnt = 1
ls = imo[0][1]
for i in range(1,N):
    if imo[i][0]<=ls:
        continue
    else:
        cnt += 1
        ls = imo[i][1]
print(cnt)
import sys
from collections import deque

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

H, W = rl()
A = [list(rs()) for _ in range(H)]
answer = 0
que = deque()
data = [[-1] * W for _ in range(H)]
for i in range(H):
    for j in range(W):
        if A[i][j] == '#':
            data[i][j] = 0
            que.append((i, j))
while que:
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    p = que.popleft()
    for i in range(4):
        nx = p[0] + dx[i]
        ny = p[1] + dy[i]
        if 0 <= ny <= H-1 and 0 <= nx <= W-1:
            if data[ny][nx] == -1:
                data[ny][nx] = data[p[1][0]] + 1
                que.append((nx, ny))
answer = max([max(z) for z in data])
print(answer)
# 54


### FIXED CODE ###

import sys
from collections import deque

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

H, W = rl()
A = [list(rs()) for _ in range(H)]
answer = 0
que = deque()
data = [[-1] * W for _ in range(H)]
for i in range(H):
    for j in range(W):
        if A[i][j] == '#':
            data[i][j] = 0
            que.append((j, i))
while que:
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    p = que.popleft()
    for i in range(4):
        nx = p[0] + dx[i]
        ny = p[1] + dy[i]
        if 0 <= ny <= H-1 and 0 <= nx <= W-1:
            if data[ny][nx] == -1:
                data[ny][nx] = data[p[1]][p[0]] + 1
                que.append((nx, ny))
answer = max([max(z) for z in data])
print(answer)
# 54
n = int(input())
s = input()
ans = max(len(set(s[:i]) & set(s[i:])) for i in range(1, n - 1))
print(ans)


### FIXED CODE ###

n = int(input())
s = input()
ans = max(len(set(s[:i]) & set(s[i:])) for i in range(1, n))
print(ans)
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
    for i in range(Q):
        l, r = map(int, input().split())
        print(t[r-1] - t[l-1])

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
lr = [tuple(map(int, input().split())) for _ in range(Q)]
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for l, r in lr:
    print(t[r-1] - t[l-1])
import sys
import numpy as np
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())


def main():
    n = ii()
    aa, bb = [], []        
    for i in range(n):
        a, b = mi()
        aa.append(a)
        bb.append(b)
    idxa = sorted(range(n), key=lambda x: aa[x])
    idxb = sorted(range(n), key=lambda x: bb[x])
    visted = [False]*n
    cura, curb = 0, 0
    t = 0
    ans = 0
    while cura < n-1 and curb < n-1:
        if t%2 == 0:
            while visted[idxb[curb]]:
                curb += 1
            ans += aa[idxb[curb]]
            visted[idxb[curb]]=True
        if t%2 == 1:
            while visted[idxa[cura]]:
                cura += 1
            ans -= bb[idxa[cura]]
            visted[idxa[cura]]=True
        t += 1
    print(ans)






if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import numpy as np
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())


def main():
    n = ii()
    x = []  
    ans = 0     
    for i in range(n):
        a, b = mi()
        x.append(a+b)
        ans -= b
    x.sort(reverse=True)
    ans += sum(x[::2])    
    print(ans)






if __name__ == '__main__':
    main()
import itertools
import math
n = int(input())
lis1 = []
for i in range(n):
    lis1.append(list(map(int, input().split())))
S = 0
for i in list(itertools.permutations(range(n))):
#     print(i, type(i))
    for j in range(n-1):
#         print(lis1[i[j]][0], lis1[i[j+1]][0])
        S += math.sqrt((lis1[i[j]][0]-lis1[i[j+1]][0])**2 + (lis1[i[j]][1]-lis1[i[j+1]][1])**2)
for i in range(1, n+1):
    S = S / i
print(S)

### FIXED CODE ###

n = int(input())
ans = float('inf')
for i in range(1, int(n**(1/2))+1):
    a, b = divmod(n, i)
    if b == 0:
        ans = min(ans, a+i-2)
print(ans)
from math import factorial

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

x = 1000000007


def com(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))


for i in range(1, K + 1):
    v = com(N - K + 1, i) * com(K-1, i -1)
    print(int(v % x))

### FIXED CODE ###

from math import factorial

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

x = 1000000007

num = factorial(N - K + 1) * factorial(K - 1)

for i in range(1, K + 1):
    if N - K < i - 1:
        print(0)
    else:
        denom = factorial(i) * factorial(N - K + 1 - i) * factorial(i - 1) * factorial(K - i)
        v = num // denom

        print(v % x)
A, B, C = map(int, input().split())

if A + B + C == 17:
  if (A = 5 or 7) and (B = 5 or 7) and (C = 5 or 7):
    print('YES')
  else:
    print('NO')
else:
  print('NO')

### FIXED CODE ###

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

if A + B + C == 17:
  if (A == 5 or 7) and (B == 5 or 7) and (C == 5 or 7):
    print('YES')
  else:
    print('NO')
else:
  print('NO')
A = int(input())
B = int(input())
C = int(input())

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")
a,v = map(float,input().split())
b,w = map(float,input().split())
t = float(input())

if a<b:
    if b+w*t <= a+v*t:
        print('YES')
    else:
        print('NO')
else:
    if a-v*t <=	b-w*t:
		print('YES')
    else:
		print('NO')

### FIXED CODE ###

a,v = map(float,input().split())
b,w = map(float,input().split())
t = float(input())

if a<b:
    if b+w*t <= a+v*t:
      print('YES')
    else:
      print('NO')
else:
    if a-v*t <=	b-w*t:
      print('YES')
    else:
      print('NO')
# -*- coding:utf-8 -*-

def main():
    List=[]
    while(True):
        a=input()
        if a=="":
            break
        else:
            List.append(a)

    List.sort(reverse=True)
    print(List[0])
    print(List[1])
    print(List[2])
        
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

# -*- coding:utf-8 -*-

def main():
    List=[]

    for i in range(10):
        a=int(input())
        List.append(a)

    List.sort(reverse=True)
    print(List[0])
    print(List[1])
    print(List[2])
        
 
if __name__ == '__main__':
    main()
a=input()
a=a.split(" ")
print(int(a[0])*int(a[1]),2*(int(a[0])+int(b[0])))


### FIXED CODE ###

a = input()
a = a.split(" ")
b = int(a[1])
a = int(a[0])
s = a*b
l = 2*(a+b)
print(s,l)
n = int(input())
A = list(map(int,input().split()))
S = [0] * (n + 1)

from collections import defaultdict
dic = defaultdict(int)
for i in range(len(A)):
  S[i+1] = S[i] + A[i]
for s in S:
  dic[s] += 1
from math import factorial
ans = 0
for k, v in dic.items():
  if v > 1:
    ans += factorial(v) / factorial(2) / factorial(v - 2)

print(int(ans))

### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
S = [0] * (n + 1)

from collections import defaultdict
dic = defaultdict(int)
for i in range(len(A)):
  S[i+1] = S[i] + A[i]
for s in S:
  dic[s] += 1
from scipy.special import comb
ans = 0
for k, v in dic.items():
  if v > 1:
    ans += comb(v, 2, exact=True)

print(int(ans))
n=int(input())
A = list(map(int, input().split
c=collections.Counter(A)
if c==len(A):
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import collections
n=int(input())
A = list(map(int, input().split()))
c=collections.Counter(A)
if len(c)==len(A):
    print("YES")
else:
    print("NO")
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")
else : print("a == b")