Harryxun/stf_run huggingface dataset:
def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

from collections import defaultdict
def get_primefactor(n: int) -> dict:
    f = defaultdict(int)
    p = 2
    while p * p <= n:
        while n % p == 0:
            f[p] += 1
        p += 1 if p == 2 else 2
    return f

a, b = map(int, input().split())
factors = factorize(GCD(a, b))

ans = len(factors) + 1

print(ans)


### FIXED CODE ###

def GCD(a:int , b: int) -> int:
    return a if b == 0 else GCD(b, a % b)

def get_divisor(n: int) -> list:
    divisor = []
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            divisor.append(i)
            if i != n // i:
                divisor.append(n // i)
    divisor.sort()
    return divisor

a, b = map(int, input().split())
divisor =  get_divisor(GCD(a, b))

ans = 1
used = [0] * len(divisor)
used[0] = 1
for i in range(1, len(divisor)):
    if used[i] == 0:
        ans += 1
        for j in range(i+1, len(divisor)):
            if used[j] == 0 and divisor[j] % divisor[i] == 0:
                used[j] = 1

print(ans)
from __future__ import division
import math

def cross(p1,p2):
    a,b,c,d=p1[0],p1[1],p2[0],p2[1]
    t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
    alpha=4*(pow(b-d,2)+pow(c-a,2))
    beta=4*(t*(b-d)-2*b*pow(c-a,2))
    gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
    judge=pow(beta,2)-4*alpha*gamma
    if judge>0:
        y1=(-beta+math.sqrt(judge))/(2*alpha)
        y2=(-beta-math.sqrt(judge))/(2*alpha)
        x1=(2*(b-d)*y1+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        x2=(2*(b-d)*y2+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x1,y1),(x2,y2))
    elif judge==0:
        y=-beta/(2*alpha)
        x=(2*(b-d)*y+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x,y),)
    else:
        return None

def maxNum(P,L):
    ans=1
    return ans
    for x,y in P:
        cnt=0
        for px,py in L:
            d=math.sqrt(pow(px-x,2)+pow(py-y,2))
            if d<=1:
                cnt+=1
        ans=max(ans,cnt)
    return ans

while True:
    n=input()
    if n==0:break
    L=[map(float,raw_input().split(",")) for i in range(n)]
    P=[]
    for i in range(n-1):
        for j in range(i+1,n):
            points=cross(L[i],L[j])
            if points:
                P.extend(points)
    print maxNum(P,L)

### FIXED CODE ###

from __future__ import division
import math

def cross(p1,p2):
    a,b,c,d=p1[0],p1[1],p2[0],p2[1]
    t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
    alpha=4*(pow(b-d,2)+pow(c-a,2))
    beta=4*(t*(b-d)-2*b*pow(c-a,2))
    gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
    judge=pow(beta,2)-4*alpha*gamma
    EPS=1e-5
    if c==a:
        y=(pow(a,2)+pow(b,2)-pow(c,2)-pow(d,2))/(2*(b-d))
        bd=pow(b-d,2)
        a1=4*bd
        b1=-8*a*bd
        c1=4*a*a*bd+pow(a*a-b*b-c*c-d*d+2*b*d,2)-4*bd
        inroot=pow(b1,2)-4*a1*c1
        if inroot<0:
            return None
        x1=(-b1+math.sqrt(inroot))/(2*a1)
        x2=(-b1-math.sqrt(inroot))/(2*a1)
        return ((x1,y),(x2,y))

    if judge>EPS:
        y1=(-beta+math.sqrt(judge))/(2*alpha)
        y2=(-beta-math.sqrt(judge))/(2*alpha)
        x1=(2*(b-d)*y1+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        x2=(2*(b-d)*y2+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x1,y1),(x2,y2))
    elif -EPS<=judge<=EPS:
        y=-beta/(2*alpha)
        x=(2*(b-d)*y+pow(c,2)+pow(d,2)-pow(a,2)-pow(b,2))/(2*(c-a))
        return ((x,y),)
    else:
        return None

def maxNum(P,L):
    ans=1
    for x,y in P:
        cnt=0
        for px,py in L:
            d=math.sqrt(pow(px-x,2)+pow(py-y,2))
            if d<=1:
                cnt+=1
        ans=max(ans,cnt)
    return ans

while True:
    n=input()
    if n==0:break
    L=[map(float,raw_input().split(",")) for i in range(n)]
    P=[]
    for i in range(n-1):
        for j in range(i+1,n):
            points=cross(L[i],L[j])
            if points:
                P.extend(points)
    print maxNum(P,L)
import sys,heapq

input=sys.stdin.readline

N=int(input())
node=[]
for i in range(0,N-1):
    for j in range(i+1,N):
        node.append((i,j))

_to={key:set([]) for key in node}
_from={key:set([]) for key in node}

for i in range(0,N):
    A=list(map(int,input().split()))
    for j in range(0,N-2):
        if A[j]-1>i:
            if A[j+1]-1>i:
                _to[(i,A[j]-1)].add((i,A[j+1]-1))
                _from[(i,A[j+1]-1)].add((i,A[j]-1))
            else:
                _to[(i,A[j]-1)].add((A[j+1]-1,i))
                _from[(A[j+1]-1,i)].add((i,A[j]-1))
        else:
            if A[j+1]-1>i:
                _to[(A[j]-1,i)].add((i,A[j+1]-1))
                _from[(i,A[j+1]-1)].add((A[j]-1,i))
            else:
                _to[(A[j]-1,i)].add((A[j+1]-1,i))
                _from[(A[j+1]-1,i)].add((A[j]-1,i))

day=0
q=set([])
flag={n:0 for n in node}
for key in node:
    if not _from[key]:
        conduct.add(key)
        q.add(key)
sub=set([])
while q:
    while q:
        x=q.pop()
        for n in _to[x]:
            flag[n]+=1
            if flag[n]==len(_from[n]):
                sub.add(n)
        if not q:
            q=sub
            sub=set([])
            day+=1
            break
able=True
for n in node:
    if flag[n]!=len(_from[n]):
        able=False
if able:
    print(day)
else:
    print(-1)

### FIXED CODE ###

N=int(input())
A=[[] for i in range(0,N)]
nodes=[]
for i in range(0,N-1):
    for j in range(i+1,N):
        nodes.append((i,j))

order={i:[0 for j in range(0,N)] for i in range(0,N)}
for i in range(0,N):
    A[i]=list(map(int,input().split()))
    for j in range(0,N-1):
        order[i][A[i][j]-1]=j
        #i番目の人がj番目の人と戦うのが何番目か


q=set([])
for battle in nodes:
    i,j=battle
    if order[i][j]==0 and order[j][i]==0:
        q.add(battle)

flag=[0 for i in range(0,N)]

day=0
sub=set([])
while q:
    while q:
        i,j=q.pop()
        flag[i]+=1
        flag[j]+=1
        if flag[i]!=N-1:
            s=A[i][order[i][j]+1]-1
            if flag[s]>=order[s][i]:
                sub.add((i,s))
        if flag[j]!=N-1:
            t=A[j][order[j][i]+1]-1
            if flag[t]>=order[t][j]:
                sub.add((j,t))

        if not q:
            day+=1
            q=sub
            sub=set([])
            break

able=True
for i in range(0,N):
    if flag[i]!=N-1:
        able=False

if able:
    print(day)
else:
    print(-1)
color = list(map(int, input().split()))
print(len(set(color))

### FIXED CODE ###

color = list(map(int,input().split()))
print(len(set(color)))
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

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())
    
def main():
    
    N, M = NMI()
    
    uf = UnionFind(N)
    
    for m in range(M):
        A,B = NMI()
        uf.union(A-1, B-1)

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



if __name__ == '__main__':
    main()

### FIXED CODE ###

D, T , S  =map(int,input().split())

if T*S >= D:
  print("Yes")
else:
  print("No")
import sys

N, M = map(int,input().split())
A = list(map(int,input().split()))
if N == 1:
    while A[0] > 0:
        A[0] = A[0]//2
    print(0)
    sys.exit()

list.sort(A,reverse = True)
for i in range(M):
    while A[0] >= A[1]:
        A[0] = A[0]//2
    for i in range(0,M-1):
        if A[i] < A[i+1]:
            A[i] , A[i+1] = A[i+1] , A[i]

print(sum(A))

### FIXED CODE ###

import sys
import os
import math
import heapq

N, M = map(int,input().split())
A = list(map(int,input().split()))
#大きいものから取り出したいので-1倍してqueueに入れる

Q = []
for a in A:
    heapq.heappush(Q,-a)

for i in range(M):
    first = -heapq.heappop(Q)
    first = first//2
    heapq.heappush(Q,-first)

print(-sum(Q))
N = int(input())

a = [int(i) for i in range(N)]

x=[]
for i in range(N):

  if a[i] %2 ==0:
    x.append(a[i])
  
for i in x:
  if x[i] %3 ==0 or x[i] %5 ==0:
    print("APPROVED")
  else:
    print("DENIED")




### FIXED CODE ###

N = int(input())

a = [int(i) for i in input().split()]
v=0
x=[]
j=0
for i in range(N):
  if a[i] %2 ==0:
    x.append(a[i])
    j +=1

    
for i in range(j):
  if x[i] %3 ==0 or x[i] %5 ==0:
    v += 1

if v == j:
  print("APPROVED")
else:
  print("DENIED")
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
s = b[a[0]-1]
i for a[i] in range(1,n):
  s += b[a[i]-1] 
  if a[i-1] + 1 ==a[i]:
    s+= c[i-1]
print(s)
  

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
s = 0
for i in a:
  s += b[i-1] 
  if i -1 == a[a.index(i)-1] and a.index(i)>0:
    s+= c[i-2]
print(s)
A, B = map(int, input().split())

C = print(A+B)
D = print(A-B)
E = print(A*B)

print(max(C,D,E))


### FIXED CODE ###

A, B = map(int, input().split())
 
C = A+B
D = A-B
E = A*B
 
LIST = [C,D,E]
 
print(max(LIST))
value = input().split()
print(str(value[0]*value[1])+" "+str((value[0]+value[1])*2)

### FIXED CODE ###

z= input()
x, y = z.split()
 
m = int(x)*int(y)
l = int(x)*2+int(y)*2
print('{} {}'.format(m,l))
w,h,n=map(int,input().split())
xya=[list(map(int,input().split())) for i in range(n)]
xya1=[i[0] for i in xya if i[2]==1]
xya2=[i[0] for i in xya if i[2]==2]
xya3=[i[1] for i in xya if i[2]==3]
xya4=[i[1] for i in xya if i[2]==4]
left=max(xya1)
right=min(xya2)
lower=max(xya3)
upper=min(xya4)
if left>=right or lower>=upper:
  print(0)
else:
  print((right-left)*(upper-lower))

### FIXED CODE ###

w,h,n=map(int,input().split())
xya=[list(map(int,input().split())) for i in range(n)]
xya1=[i[0] for i in xya if i[2]==1]+[0]
xya2=[i[0] for i in xya if i[2]==2]+[w]
xya3=[i[1] for i in xya if i[2]==3]+[0]
xya4=[i[1] for i in xya if i[2]==4]+[h]
left=max(xya1)
right=min(xya2)
lower=max(xya3)
upper=min(xya4)
if left>=right or lower>=upper:
  print(0)
else:
  print((right-left)*(upper-lower))
N = int(input())
Tlist = [int(N) for N in input().split()]
M = int(input())
PXlist = [[int(i) for i in input().split()]for j in range(M)]
def time_sum():
    s = 0
    for i in range(0,N):
        s = s+Tlist[i]
    return s
def time_cal():
    empty = []
    for i in range(0,M):
        empty.append(time_sum() - Tlist[PXlist[i][0]-1] + PXlist[i][1])
    return empty
for i in time_cal():
    print(i)


### FIXED CODE ###

A, op, B = input().split()
if op is '+':
  print(int(A)+int(B))
if op is '-':
  print(int(A)-int(B))
n=int(imput())
l=[int(input()) for i in range(n)]
print(sum(l)-max(l)//2)

### FIXED CODE ###

n=int(input())
l=[int(input()) for i in range(n)]
print(sum(l)-max(l)//2)
MOD = (10 ** 9) + 7

N = int(input())
s = list(input())

dp = [[0 for i in range(N)] for j in range(N)]


for i in range(N):
	dp[i][i] = 1
for i in range(N - 1):
	dp[i][i + 1] = 1

for n in range(1, N):
	dp[n][0] = (dp[n - 1][0] + 2 * dp[n - 1][1]) % MOD
	for l in range(1, n):
		dp[n][l] = (dp[n - 1][l - 1] + 2 * dp[n - 1][l + 1]) % MOD

print(dp[N - 1][len(s)])

### FIXED CODE ###

MOD = (10 ** 9) + 7

N = int(input())
s = list(input())

dp = [[0] * (N + 2) for i in range(N + 1)]

for n in range(N + 1):
	for l in range(n + 1):
		if n == 1:
			dp[n][l] = 1
		elif l == 0:
			dp[n][l] = (dp[n - 1][0] + 2 * dp[n - 1][1]) % MOD
		else:
			dp[n][l] = (dp[n - 1][l - 1] + 2 * dp[n - 1][l + 1]) % MOD

print(dp[N][len(s)])
x,y,z = input().stlip()
x = int(x)
y = int(y)
z = int(z)
if x＊y > z:
  print(x＊y)
else:
  print(z)


### FIXED CODE ###

x,y,z = map(int,input().split())
x = int(x)
y = int(y)
z = int(z)
if x*y < z:
  print(x*y)
else:
  print(z)
N = int(input())
H = map(int, input().split())
    
if N == 1:
    print("Yes")
    
else:
    for i in range(N - 1, -1, -1):
        if H[i] - H[i - 1] == -1:
            H[i - 1] -= 1
            
        elif H[i] - H[i - 1] < -1:
            print("No")
            break
            
    if k == 0:
        print("Yes")
        
            
        

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
    
if N == 1:
    print("Yes")
    
else:
    for i in range(N - 1, 0, -1):
        if H[i] - H[i - 1] == -1:
            H[i - 1] -= 1
            
        elif H[i] - H[i - 1] < -1:
            print("No")
            break
            
    if i == 1:
        print("Yes")
n,m = map(int,input().split())
a = []
b = []
for i in range(n):
    x,y = map(int,input().split())
    a.append(x)
    b.append(y)
a_b = dict(zip(a,b))
a_b = sorted(a_b.items(), key=lambda x:x[0])

c = 0
ans = 0
t = 0
for i in range(n):
    c += a_b[i][1]
    if c > m:
        ans += a_b[i][0] * (m - t)
        break
    else:
        ans += a_b[i][0] * a_b[i][1]
        t += a_b[i][1]

print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
a_b = {}
for i in range(n):
    x,y = map(int,input().split())
    if x in a_b.keys():
        a_b[x] += y
        continue
    a_b[x] = y
a_b = sorted(a_b.items(), key=lambda x:x[0])

#print(a_b)
c = 0
ans = 0
t = 0
for i in range(int(len(a_b))):
    c += a_b[i][1]
    if c > m:
        ans += a_b[i][0] * (m - t)
        break
    else:
        ans += a_b[i][0] * a_b[i][1]
        t += a_b[i][1]

print(ans)
n, m = map(int, input().split())
d = {i+1 : [] for i  in range(n)}
for _ in range(m):
    u, v = map(int, input().split())
    d[u].append(v)
s, t = map(int, input().split())
q = [s]
visited = set([s])
def calc(c):
    global visited
    flag = True
    for i, v in enumerate(q[:]):
        q.pop(i)
        es = [e3 for e1 in d[v] for e2 in d[e1] for e3 in d[e2] if not e3 in visited]
        if len(es):
            flag = False
        if t in es:
            return c
        else:
            visited |= set(es)
            q.extend(es)
    if flag:
        return -1
    return calc(c + 1)
print(calc(1))


### FIXED CODE ###

n, m = map(int, input().split())
d = {i+1 : [] for i  in range(n)}
for _ in range(m):
    u, v = map(int, input().split())
    d[u].append(v)

visited1 = [False for i in range(n+1)]
visited2 = [False for i in range(n+1)]
visited3 = [False for i in range(n+1)]

s, t = map(int, input().split())
q = set([s])
c = 1
def solve():
    global visited1, visited2,visited3,  c, q
    while True:
        q2 = list(q)
        q = set([])
        for v in q2:
            for e1 in d[v]:
                if visited1[e1]:
                    continue
                visited1[e1] = True
                for e2 in d[e1]:
                    if visited2[e2]:
                        continue
                    visited2[e2] = True
                    for e3 in d[e2]:
                        if visited3[e3]:
                            continue
                        visited3[e3] = True
                        if e3 == t:
                            return c
                        else:
                            q.add(e3)
        if not len(q):
            return -1
        c += 1
print(solve())
n=int(input())
a=list(map(int,input().split()))
if n%2==0:
    b=sorted(a)
    i=0
    while i<len(b):
        if not (b[i]==b[i+1] or b[i+2]==b[i]+2):
            print(0)
            exit()
        i+=2
    print((2**(len(b)//2))%(10**9+7))
else:
    b=sorted(a)
    if b[0]!=0:
        print(0)
        exit()
    else:
        i=1
        while i<len(b):
            if not (b[i]==b[i+1] or b[i+2]==b[i]+2):
                print(0)
                exit()
            i+=2
        print(2**(len(b)//2)%(10**9+7))


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
if n%2==0:
    b=sorted(a)
    i=0
    while i<len(b):
        if not (b[i]==b[i+1] or b[i+2]==b[i]+2):
            print(0)
            exit()
        i+=2
    print((2**(len(b)//2))%(10**9+7))
else:
    b=sorted(a)
    if len(b)>1:
        if b[1]==0:
            print(0)
            exit()
    if b[0]!=0:
        print(0)
        exit()
    else:
        i=1
        while i<len(b):
            if not (b[i]==b[i+1] or b[i+2]==b[i]+2):
                print(0)
                exit()
            i+=2
        print(2**(len(b)//2)%(10**9+7))
N,M = map(int,input().split())

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

R = []
for i in range(M):
  R.append(list(map(int,input().split())))

ans = N

for i in range(0,N):
  flg = 0
  for r in R:
    if r[0] == i+1:
      if H[i] < H[r[1]]:
        flg = 1
        break
    if r[1] == i+1:
      if H[i] < H[r[0]]:
        flg = 1
        break
  
  if flg == 1:
    ans = ans - 1

print(ans)      







### FIXED CODE ###

N,M = map(int,input().split())
H = [0]
H.extend(list(map(int,input().split())))

R = [[] for _ in range(N+1)]
for i in range(M):
  a,b = map(int,input().split())
  R[a].append(b)
  R[b].append(a)

ans = N

# print(H)
# print(R)

for i in range(1,N+1):
  for j in R[i]:
    if H[i] <= H[j]:
      ans = ans - 1
      break


print(ans)
###
#main
if __name__ == "__main__":
    N = int(input())
    S = input()
#    count = 0
    countMin = 200001
    counttemp = 0
    isWhite = True
    numlist = []
    for t in S:
        if t == "#" and isWhite:
            isWhite = False
            numlist.append(counttemp)
            counttemp = 0
        if t == "." and not isWhite:
            isWhite = True
            numlist.append(counttemp)
            counttemp = 0
        counttemp += 1
    
    numlist.append(counttemp)
    if len(numlist) <= 2:
        countMin = 0
    else:
        j = 1
        while j < N:
            counttemp = 0
            i = 2
            while i < N:
                if i < j :
                    counttemp += numlist[i-1]
                else:
                    counttemp += numlist[i]
                i += 2
            if counttemp < countMin:
                countMin = counttemp
            j += 1    
#    print(numlist)           
    print(countMin)
    

### FIXED CODE ###

###
#main
if __name__ == "__main__":
    N = int(input())
    S = input()
#    count = 0
    countMin = 200001
    counttemp = 0
    isWhite = True
    numlist = []
    for t in S:
        if t == "#" and isWhite:
            isWhite = False
            numlist.append(counttemp)
            counttemp = 0
        if t == "." and not isWhite:
            isWhite = True
            numlist.append(counttemp)
            counttemp = 0
        counttemp += 1
    
    numlist.append(counttemp)
    if len(numlist) <= 2:
        countMin = 0
    else:
        countMin = sum(numlist[2::2])
        temp = countMin
        i = 2
        while i < len(numlist):
            temp += numlist[i-1] - numlist[i]
            countMin = temp if temp < countMin else countMin
            i += 2
#    print(numlist)           
    print(countMin)
list = input().split(" ")
H = int(list[0])
skill = input().split(" ")
skill = [int(i) for i in skill]

a1 = max(skill)
skill.remove(a1)
a2 = max(skill)

if a1 + a2 >= H:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

list = input().split(" ")
H = int(list[0])
skill = input().split(" ")
skill = [int(i) for i in skill]

sum = 0
for i in skill:
    sum = sum + i

if sum >= H:
    print("Yes")
else:
    print("No")
N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x,y,z = a[0],a[1],a[2]
    if x**2 + y**2 == z**2:
        print("yes")
    else:
        print("no")

### FIXED CODE ###

N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x = a[0]
    y = a[1]
    z = a[2]
    if x**2 + y**2 == z**2:
        print("YES")
    else:
        print("NO")
A,B,C = I()
if max(A,B,C) == A:
    print(A*10+B+C)
if max(A,B,C) == B:
    print(B*10+A+C)
else:
    print(C*10+A+B)

### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

A,B,C = I()
if max(A,B,C) == A:
    print(A*10+B+C)
elif max(A,B,C) == B:
    print(B*10+A+C)
else:
    print(C*10+A+B)
a , b = (input().split())

if (a+b) > 24:
	print (a + b - 24)
else:
  	print (a + b)


### FIXED CODE ###

a , b = map(int, input().split())
if a+b >= 24:
	print ((a + b) - 24)
else:
  	print (a + b)
import bisect

def main():
    s = input()
    k = int(input())
    n = len(s)
    dp = []
    for l in range(n):
        for r in range(l + 1, n + 1):
            t = s[l:r]
            i = bisect.bisect_left(dp, t)
            if t == dp[i]: continue
            if len(dp) < k:
                bisect.insort(dp, t)
            elif t < dp[-1]:
                dp.pop()
                bisect.insort(dp, t)
    print(dp[-1])

main()


### FIXED CODE ###

import bisect

def main():
    s = input()
    k = int(input())
    n = len(s)
    dp = []
    for l in range(n):
        for r in range(l + 1, min(n + 1, l + 6)):
            t = s[l:r]
            i = bisect.bisect_right(dp, t)
            if i > 0:
                if t == dp[i - 1]: continue
            if len(dp) < k:
                bisect.insort(dp, t)
            elif t < dp[-1]:
                dp.pop()
                bisect.insort(dp, t)
    print(dp[-1])

main()
#include<bits/stdc++.h>
// Begin Header {{{
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i,n) for(ll i=0; i<n; i++)
#define loop(i, j, n) for(ll i=j; i<n; i++)
#define all(x) (x).begin(), (x).end()
constexpr int INF  = 0x3f3f3f3f;
const long long mod=1e9+7;
const long double PI = acos(-1);
// }}} End Header
int main() {
	string s;
	cin >> s;
	int f1, f2;
	rep(i,s.length()){
		if(s[i]=='A'){
			f1=i;
			break;
		}
	}
	rep(i,s.length()){
		if(s[i]=='Z') f2=i;
	}
	cout << f2-f1+1 << endl;
	return 0;
}

### FIXED CODE ###

s=input()
f1=0
f2=0
ok=True
for i in range(len(s)):
    if s[i]=='A' and ok:
        ok=False
        f1=i
    if s[i]=='Z': f2=i
print(f2-f1+1)
S = raw_input()

s = S % 60
h = (S - S % 3600) / 3600
m = (S - s - h * 3600) / 60

print h + ":" + m + ":" + s

### FIXED CODE ###

S = input()
h = S / 3600
s = S % 60
m = (S - h * 3600 - s) / 60

print "%d:%d:%d" %(h,m,s)
import math
def get_sieve_of_eratosthenes(n):
    prime = []
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

A,B = map(int,input().split())
 
GCD = math.gcd(A,B)
 
prime_list = get_sieve_of_eratosthenes(GCD)
counter = 1
for p in prime_list:
    if GCD % p == 0:
        counter += 1
        while(GCD % p == 0):
            GCD = GCD // p
print(counter)
 

### FIXED CODE ###

N = int(input())
if N % 2 == 1:
    odd = N // 2 + 1
else:
    odd = N // 2
print(odd/N)