Harryxun/stf_run huggingface dataset:
n , k , q = map(int, input().split())
points = [k - q] * n
for i in range(q):
    c = int(input())
    points[c-1] += 1
for i in range(n):
    if points[i] >= 1:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

S = input()

if S == 'Sunny':
    S_tomorrow = 'Cloudy'
elif S == 'Cloudy':
    S_tomorrow = 'Rainy'
else:
    S_tomorrow = 'Sunny'

print(S_tomorrow)
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

N = int(input())
A = [int(i) for i in input().split()] 

g = gcd(*A)

print(g)

### FIXED CODE ###

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

N = int(input())
A = [int(i) for i in input().split()]
g = A[0]
for n in range(1,N):
    g = gcd(g,A[n])

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

loop_checker = {}
before_loop_len = 0
loop_len = 0

count = 2
now = 0
while True:
    if A[now] in loop_checker.values():
        before_loop_len = loop_checker[A[now]]
        loop_len = count - before_loop_len - 1
        break
    else:
        loop_checker[count - 1] = A[now]
        now = A[now] - 1
        count += 1

if K <= before_loop_len:
    print(loop_checker[K])
else:
    checkK_prep = K - before_loop_len
    checkK = checkK_prep % loop_len
    print(loop_checker[before_loop_len + checkK])


### FIXED CODE ###

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

flag = [False] * N
counted = [1]

nextT = A[0]
flag[0] = True
for x in range(N):
    if flag[nextT - 1] is False:
        counted.append(nextT)
        flag[nextT - 1] = True
        nextT = A[nextT - 1]
    else:
        break
before_loop_len = counted.index(nextT)
loop_len = x - before_loop_len + 1

if K <= before_loop_len:
    print(counted[K])
else:
    checkK_prep = K - before_loop_len
    checkK = checkK_prep % loop_len
    print(counted[before_loop_len + checkK])
print('YES' if sorted(input()) == [*'  557'] else 'NO')

### FIXED CODE ###

print('YES' if sorted(input()[::2]) == ['5','5','7'] else 'NO')
#!/usr/bin/env python3

def main():
    n, m, k = map(int, input().split())
    friends = [set() for i in range(n)]
    blocks = [set() for i in range(n)]
    parents = [i for i in range(n)]
    for i in range(m):
        a, b = map(int, input().split())
        friends[a - 1].add(b - 1)
        friends[b - 1].add(a - 1)
        unite(a - 1, b - 1, parents)
    for i in range(k):
        c, d = map(int, input().split())
        blocks[c - 1].add(d - 1)
        blocks[d - 1].add(c - 1)
    groups = {}
    for i in range(n):
        p = find(i, parents)
        if p not in groups:
            groups[p] = set()
        groups[p].add(i)
    res = []
    for i in range(n):
        p = find(i, parents)
        res.append(len(groups[p] - friends[i] - blocks[i]) - 1)
    print(" ".join([str(x) for x in res]))

def unite(x, y, parents):
    px = find(x, parents)
    py = find(y, parents)
    parents[py] = px

def find(x, parents):
    if parents[x] == x:
        return x
    fx = find(parents[x], parents)
    parents[x] = fx
    return fx
if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3

import sys

def main():
    sys.setrecursionlimit(1000000)
    n, m, k = map(int, input().split())
    friends = [set() for i in range(n)]
    blocks = [set() for i in range(n)]
    parents = [i for i in range(n)]
    for i in range(m):
        a, b = map(int, input().split())
        friends[a - 1].add(b - 1)
        friends[b - 1].add(a - 1)
        unite(a - 1, b - 1, parents)
    for i in range(k):
        c, d = map(int, input().split())
        blocks[c - 1].add(d - 1)
        blocks[d - 1].add(c - 1)
    groups = [set() for i in range(n)]
    for i in range(n):
        p = find(i, parents)
        groups[p].add(i)
    res = []
    for i in range(n):
        p = find(i, parents)
        res.append(len(groups[p]) - len(friends[i]) - len(groups[p] & blocks[i]) - 1)
    print(" ".join([str(x) for x in res]))

def unite(x, y, parents):
    px = find(x, parents)
    py = find(y, parents)
    parents[py] = px

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

if __name__ == "__main__":
    main()
n = int(input())
a = input().split(" ")
lista = [int(n) for n in a]
if 0 in lista:
  print(0)
  exit()
else:
  kotae=1
  for i in range(n+1):
    kotae=kotae*lista[i]
    if kotae>10**18:
        print(-1)  
        exit()
  print(kotae)


### FIXED CODE ###

n = int(input())
a = input().split(" ")
kotae=1
listaa = [int(n) for n in a]
lista = sorted(listaa)
if lista[0]==0:
  print(0)
  exit()
for i in range(n):
  kotae*=lista[i]
  if kotae>10**18:
    kotae=-1
    break
if kotae>10**18:
  kotae=-1
print(kotae)
S = input()
if len(S)%2 == 0:
  for i in range(len(S)//2):
    if S[i*2:(i+1)*2]!="hi":
      print("No")
      exsit()
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = "hi"
S = input()
flag = False
for i in range(5):
  if S==s:
    flag=True
    break
  s = s+"hi"
if flag:
  print("Yes")
else:
  print("No")
s=input()
t=input()
l=len(s)
count=0
if(s==t):
  break
else:
  for i in range(l):
    if(s[i]==t[i]):
      continue
    else:
      count+=1

print(count)

### FIXED CODE ###

s=input()
t=input()
l=len(s)
count=0
if(s==t):
  print(count)
  
else:
  for i in range(l):
    if(s[i]==t[i]):
      continue
    else:
      count+=1

  print(count)
N,A,B=map(int,input().split())
import math
c=math.ceil(N/(A+B))
ball=('b'*A+'a'*B)*c
print(ball.count('b',0,N))


### FIXED CODE ###

N,A,B=map(int,input().split())
if N == (N//(A+B))*(A+B):
    print(N-(N//(A+B))*(B))
elif (N//(A+B))*(A+B)<N <= (N//(A+B))*(A+B)+A:
    print(N-(N//(A+B))*(B))
else:
    print((N//(A+B)+1)*(A))
N, K, S = map(int, input().split())
ans = [S for i in range(N) if i =< K - 1 else 0]
print(" ".join(ans))

### FIXED CODE ###

N, K, S = map(int, input().split())
U = str(S + 1) if S != 10 ** 9 else "1"
S = str(S)
ans = [S if i <= K - 1 else U for i in range(N)]
print(" ".join(ans))
A, B = map(int, input().split()
count = 0
for i in range(A, B+1):
    if str(i) == str(i)[::-1]:
        count += 1
print(count)

### FIXED CODE ###

A, B = map(int, input().split())
a = 0
for i in range(A, B+1):
    i = str(i)
    if i == i[::-1]:
        a += 1
print(a)
s = input()
if s == 'A':
    print 'T'
elif s=='T':
    print 'A'
elif s=='G':
    print 'C'
elif s=='C':
    print 'G'

### FIXED CODE ###

s = str(input())
if s == 'A':
    print('T')
elif s=='T':
    print('A')
elif s=='G':
    print('C')
elif s=='C':
    print('G')
N,M=[int(i) for i in input() .split()]
# 二次元配列を得られる
A = []
answer=[0]*M
for i in range(M):
    A.append(list(map(int,input().split())))
j=0
for i in range(M):
    if answer[int(A[i][0])-1] == 0:
        answer[int(A[i][0])-1] = int(A[i][1])
    elif answer[int(A[i][0])-1] == int(A[i][1]):
        answer[int(A[i][0])-1] = int(A[i][1])
    else:
        print(-1)
        j=j+1
        break
seisu=0
if answer[0]==0:
    j=j+1
    print(-1)

if j==0:
    for i in range(M):
        seisu=answer[M-1-i]*(10**(M-i-1))+seisu
    print(seisu)


### FIXED CODE ###

N,M=[int(i) for i in input().split()]
# 二次元配列を得られる
A = []
answer=[-1]*N
for i in range(M):
    A.append(list(map(int,input().split())))
j=0
for i in range(M):
    if answer[int(A[i][0])-1] == -1:
        answer[int(A[i][0])-1] = int(A[i][1])
    elif answer[int(A[i][0])-1] == int(A[i][1]):
        answer[int(A[i][0])-1] = int(A[i][1])
    else:
        print(-1)
        j=j+1
        break
seisu=0
if j==0 and answer[0]==0 and N!=1:
    j=j+1
    print(-1)
if j==0 and (answer[0]==0 or answer[0]==-1) and N == 1:
    j=j+1
    print(0)
if j==0:
    for i in range(N):
        if answer[i]==-1:
            '''
            N = 5 case
            -1,7,-1,9,0
            ?7?90
            5 digits
            17090 
            '''
            if i == 0 :
                answer[0]=1
            else:
                answer[i]=0

        seisu=answer[i]*(10**(N-i-1))+seisu
    print(seisu)
while True:
    e = int(raw_input())
 
    if e == 0: break

    ans = 1e8

    for z in range(10**2+1):
        for y in range(10**3+1):
            if y**2 + z**3 > e:
                break
            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)
X=input()
c=list(input())
result=0
i=0
while i<len(c):
    if c[i]=='A':
        if c[i+1]=='B' and c[i+2]=='C':
            result+=1
            i+=3
        else:
            i+=1
    else:
        i+=1
print(result)

### FIXED CODE ###

X=input()
c=list(input())
result=0
i=0
while i<len(c)-2:
    if c[i]=='A':
        if c[i+1]=='B' and c[i+2]=='C':
            result+=1
            i+=3
        else:
            i+=1
    else:
        i+=1
print(result)
# ABC083 C - Multiple Gift
x,y = map(int,input().split())

ans = 0
while x <= y:
    x *= 2
    ans += 1
print(ans)

### FIXED CODE ###

# ABC083 A - Libra
a,b,c,d = map(int,input().split())

if a+b > c+d:
    print('Left')
elif a+b == c+d:
    print('Balanced')
elif a+b < c+d:
    print('Right')
x, a = map(int, input())
if x < a:
    print(0)
else:
    print(10)


### FIXED CODE ###

# A Rounding

x, a = map(int, input().split())
if x < a:
    print(0)
else:
    print(10)
s,c = map(int,input().split())

if s*2 <= c:
    res = s
    c -= s*2
    s = 0
else:
    res += c//2
    c = 0

#print(res,s,c)

if c:
    res += c//4
print(res)

### FIXED CODE ###

s,c = map(int,input().split())
res = 0
if s*2 <= c:
    res = s
    c -= s*2
    s = 0
else:
    res += c//2
    c = 0

if c:
    res += c//4
print(res)
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

B = [0] * N
C = 0
D = 0
E = []
for i in range(K):
    if i == 0:
        B[i] += 1
        C = A[0]
        D += 1
        E.append(C)
        #print(i, C)
        #print(B)
    else:
        if B[C - 1] == 0:
            B[C - 1] += 1
            C = A[C - 1]
            D += 1
            #E.append(C)
            #print(i, C)
            #print(B)
        else:
            #print("２回目")
            #print(D, K % D)
            #print(E)
            print(E[K % D])
            exit()

print(C)

### FIXED CODE ###

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

mrk = [0] * n
plc = a[0] - 1
rp = 0 #ループに入った場所
rpc = -1#ループに入ってから
prc = 0#ループに入る前
for i in range(1, k + 1):
#    logging.debug(i)
    if rpc >= 0:
        rpc += 1
        if plc == rp:
#            logging.debug("prc{},rpc{}".format(prc,rpc))
            k = (k - prc) % rpc
#            logging.debug("k{},plc{}".format(k,plc))
            for i in range(k):
                plc = a[plc] - 1
#                logging.debug(plc)
            print(plc + 1)
            exit()
    if rpc == -1:
        prc += 1
    if mrk[plc] == 1 and rpc == -1:
        rp = plc
        rpc = 0
    mrk[plc] += 1
    if i < k:
        plc = a[plc] - 1
#    logging.debug("{},next{},{},roop{}".format(mrk,plc,prc,rpc))

print(plc + 1)
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
ans=0
while(d<=x):
    ans+=1
    d=d+l[ans-1]
print(ans)

### FIXED CODE ###

n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
ans=0
while(d<=x):
    ans+=1
    if ans == n+1:
        break
    d=d+l[ans-1]
print(ans)
def main():
    n,k = map(int,input().split())
    X = list(map(int,input().split()))

    import bisect

    i = bisect.bisect_left(X,0)
    if X[i] == 0:
        k -= 1


    ans = 10**9
    if k == 0:
        print(0)
        exit()
    for j in range(-k,1):
        # print(j)
        if i + j < 0 or i+j+k-1 >len(X)-1:
            continue
        # print(l,r)
        l = X[i+j]
        r = X[i+j+k-1]

        l = min(0,l)
        r = max(r,0)

        a = min(abs(l),abs(r))
        b = max(abs(l),abs(r))

        t = 2*a + b
        ans = min(t,ans)

    print(ans)



main()

### FIXED CODE ###

import bisect

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

s = bisect.bisect_left(X,0)
if 0 in X:
    K -= 1
else:
    bisect.insort_left(X,0)
    N += 1

MIN = 2 * 10**9
for i in range(K+1):
    if s - K + i >= 0 and s + i <N:
        f = X[s -K+i]
        l = X[s+i]
        if abs(f) < abs(l):
            ans = abs(f) * 2 + abs(l)
        else:
            ans = abs(l) * 2 + abs(f)
        MIN =min(MIN,ans)

print(MIN)
N, K = map(int, input().split())
H=list(map(int, input().split() for _ in range(N)))

import numpy as np
dp=np.full(N+K, 1e+14, dtype=np.int64)
dp[0]=0
for i in range(1, N):
  dp[i:i+K]=np.minimum(dp[i:i+K], np.abs(H[i-1]-H[i:i+K])+dp[i-1])

print(dp[N - 1])  # 0-indexedに変換しておく

### FIXED CODE ###

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

dp=[float("inf")]*N
dp[0]=0

for i in range(1, N):
	if i==1:
		dp[i]=min(dp[i], abs(h[i]-h[i-1]))
	else:
		start=max(0, i-K)
		dp[i]=min(dp[j]+abs(h[j]-h[i]) for j in range(start, i))

print(dp[-1])
num = int(input())
prices = []

for i in range(num):
  prices[i].append(input())

max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i

sum=0
for i in range(num):
  if i==max_i:
    sum = sum + int(prices[i]/2)
  else:
    sum = sum + prices[i]

### FIXED CODE ###

num = int(input())
prices = []
 
for i in range(num):
  prices.append(int(input()))

max_i=0
max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i
 
sum=0
for i in range(num):
  if i==max_i:
    sum += int(prices[i]/2)
  else:
    sum += prices[i]

print(sum)
mod = 10 ** 9 + 7
def dfs(v, p, k):
    ret = 1
    if len(graph[v]) > k:
        return 0
    kc = k - 2
    if p == -1:
        kc = k - 1
    for vi in graph[v]:
        if vi != p:
            ret *= kc
            ret = ret % mod
            ret *= dfs(vi, v, k)
            ret = ret % mod
            kc -= 1
        else:
            continue
    return ret

n, k = map(int, input().split())
graph = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
    
print((dfs(0, -1, k) * k) % mod)

### FIXED CODE ###

import sys
sys.setrecursionlimit(410000)

mod = 10 ** 9 + 7
def dfs(v, p, k):
    ret = 1
    if len(graph[v]) > k:
        return 0
    kc = k - 2
    if p == -1:
        kc = k - 1
    for vi in graph[v]:
        if vi != p:
            ret *= kc
            ret = ret % mod
            kc -= 1
    for vi in graph[v]:
        if vi != p:
            ret *= dfs(vi, v, k)
            ret = ret % mod
    return ret

n, k = map(int, input().split())
graph = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
    
print((dfs(0, -1, k) * k) % mod)
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N, X = input().split(" ")
N = int(N)
X = int(X)
list = input().split(" ")
ans_list = [abs(X - int(list[i])) for i in range(N)]
print(int(gcd(ans_list)))

### FIXED CODE ###

from fractions import gcd

N, X = map(int, input().split())
xlist = list(map(int, input().split()))
gaplist = []
for i in range(N):
    tmp = abs(xlist[i] - X)
    if tmp==0:
        tmp = 1
    gaplist.append(tmp)

ans = gaplist[0]
for i in range(1,N):
    ans = gcd(ans, gaplist[i])
    #次のxとの最大公約数を動的計画法求めるメソッド O(logX)

print(ans)
import numpy as np

s = input()

length = len(s)

dp = np.zeros((100100,13))

s = list(reversed(s))

dp[0][0]=1
ten = 1
mod = 1000000007


for i in range(length):
	if s[i] == '?':
		for num in range(10):
			d = num*ten
			for j in range(13):
				k = (j+d)%13
				dp[i+1][k] += dp[i][j]
				dp[i+1][k] %= mod
	else:
		num = int(s[i])
		d = num*ten
		for j in range(13):
			k = (j+d)%13
			dp[i+1][k] += dp[i][j]
			dp[i+1][k] %= mod
	ten *= 10
	ten %= 13

print(int(dp[length][5]%mod))

### FIXED CODE ###

from sys import stdin
s = stdin.readline()[:-1]

length = len(s)

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

s = list(reversed(s))

dp[0][0]=1
ten = 1
mod = 1000000007


for i in range(length):
	if s[i] == '?':
		for num in range(10):
			d = num*ten
			for j in range(13):
				k = (j+d)%13
				dp[i+1][k] += dp[i][j]
				dp[i+1][k] %= mod
	else:
		num = int(s[i])
		d = num*ten
		for j in range(13):
			k = (j+d)%13
			dp[i+1][k] += dp[i][j]
			dp[i+1][k] %= mod
	ten *= 10
	ten %= 13

print(int(dp[length][5]%mod))
S=input().split()
total=0

for i in range(ren(S)):
    if  i%2=0:
        if  (S[i]=='R')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1
    else:
        if  (S[i]=='L')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1

if  total==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S=input()
total=0

for i in range(len(S)):
    if  (i%2)==0:
        if  (S[i]=='R')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1
    else:
        if  (S[i]=='L')or(S[i]=='U')or(S[i]=='D'):
            pass
        else:
            total+=1

if  total==0:
    print('Yes')
else:
    print('No')
[a,b] = map(int,input(),split())
if a < b:
    print(a < b)
else if a > b:
    print(a > b)
else:
    print(a == b)

### FIXED CODE ###

[a, b] = [int(_) for _ in input().split()]

if a < b:
    print('a < b')
elif a > b:
    print('a > b')
else:
    print('a == b')
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))


### FIXED CODE ###

print(input().count("1"))
import math
import sys

antenas = []
for i in range(5):
    antenas.append(int(input()))
k = int(input())

for f in antenas:
    for d in antenas:
        if abs(f-d) > k:
            print(":(")
            sys.exit(-1)

print("Yay!")

### FIXED CODE ###

import math
import sys

antenas = []
for i in range(5):
    antenas.append(int(input()))
k = int(input())

for f in antenas:
    for d in antenas:
        if abs(f-d) > k:
            print(":(")
            sys.exit(0)

print("Yay!")
import math

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

print(int(a*b/math.gcd(a,b)))


### FIXED CODE ###

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

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

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

print(lcm(a,b))
N = int(input()) 
hotel = [int(input()) for i in range(N)] #リストの内包表記
view = 1

for i in range (1, N, 1):
    judge = 1
    for j in range (0, i, 1):
        if hotel[i] >= hotel[j]:
            pass#何もしない
        else:
            judge = 0
            break
    if judge == 1:
        view += 1

print (view)


### FIXED CODE ###

N = int(input()) 
hotel = list(map(int, input().split())) #入力してint型リストに格納
view = 1

for i in range (1, N, 1):
    judge = 1
    for j in range (0, i, 1):
        if hotel[i] >= hotel[j]:
            pass#何もしない
        else:
            judge = 0
            break
    if judge == 1:
        view += 1

print (view)
n = int(input())
Flg = True
for _ in range(n):
    t, x, y = map(int, input().split())
    xy = x+y
    if t >= (xy):
        if ((t % 2 != 0) & (xy % 2 == 0)) or (t % 2 == 0 & xy % 2 != 0):
            Flg = False
    else:
        Flg = False
if Flg == True:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b = map(int, input().split())
N = a * b
if N % 2 != 0:
    print("Odd")
else:
    print("Even")
def resolve():
    import math
    A, B = map(int, input().split())
    print(A*B//math.gcd(A, B))
resolve()

### FIXED CODE ###

def resolve():
    A, B = map(int, input().split())
    ans = []
    for i in range(1, min(A, B)+1):
        if A%i == 0 and B%i == 0:
            ans.append(i)
    print(A*B//ans[-1])
resolve()
a=int(input())
s=input()
if a >= 3200:
  proint("red")
else:
  print(s)

### FIXED CODE ###

a = int(input())
s = input()
if a >= 3200:
  print(s)
else:
  print("red")
a = int(intput())
ans = a*(1+a*(1+a))
print(ans)
       

### FIXED CODE ###

a = int(input())
ans = a*(1+a*(1+a))
print(ans)
import math as np
K=int(input())
s=0
d=0
for a in range(1,K+1):
    if a%2==0:
        for b in range(2,K+1,2):
            if a>b:
                if a%b==0:
                    d=b
                else:
                    d=np.gcd(a%b,b)
            if a<b:
                if b%a==0:
                    d=a
                else:
                    d=np.gcd(b%a,a)
            if a==b:
                d=a
            for c in range(2,K+1,2):
                if c>d:
                    if c%d==0:
                        s+=d
                    else:
                        s+=np.gcd(c%d,d)
                if c<d:
                    if d%c==0:
                        s+=c
                    else:
                        s+=np.gcd(d%c,c)
                if c==d:
                    s+=c
    if a%2==1:
        for b in range(1,K+1,2):
            if a>b:
                if a%b==0:
                    d=b
                else:
                    d=np.gcd(a%b,b)
            if a<b:
                if b%a==0:
                    d=a
                else:
                    d=np.gcd(b%a,a)
            if a==b:
                d=a
            for c in range(1,K+1,2):
                if c>d:
                    if c%d==0:
                        s+=d
                    else:
                        s+=np.gcd(c%d,d)
                if c<d:
                    if d%c==0:
                        s+=c
                    else:
                        s+=np.gcd(d%c,c)
                if c==d:
                    s+=c
    if K%2==0:
        s+=K**3-(K//2)**3-(k//2+1)**3
    else:
        s+=K**3-(K//2)**3-(k//2)**3
print(s)


### FIXED CODE ###

import numpy as np
K=int(input())
s3=0
s2=0
s1=0
s0=0
for a in range(1,K-1):
    for b in range(a+1,K):
        d=np.gcd(a,b)
        for c in range(b+1,K+1):
            s0+=np.gcd(c,d)
for a in range(1,K):
    for c in range(a+1,K+1):
        s1+=np.gcd(a,c)
for a in range(1,K):
    for b in range(a+1,K+1):
        s3+=np.gcd(a,b)
for k in range(K+1):
    s2+=k
print(s0*6+s1*3+s3*3+s2)
N = int(input())

h = []
for i in range(N):
    h = list.append(int(input()))

max = 0
for i in range(n):
    if max <= h[i]:
        max = h[i]
        count += 1

print(count)

### FIXED CODE ###

N = int(input())
h = list(map(int, input().split()))
count = 0
max = 0
for i in range(N):
    if max <= h[i]:
        max = h[i]
        count += 1
print(count)
import sys

n = sys.stdin.readlines()
for i in n:
    a, b = [int(x) for x in i.split()]
    if a == 0 and b == 0:
        break
    if a > b:
        print(a + ' ' + b)
    else:
        print(b + ' ' + a)

### FIXED CODE ###

import sys

n = sys.stdin.readlines()
for i in n:
    a, b = [int(x) for x in i.split()]
    if a == 0 and b == 0:
        break
    if a < b:
        print(a, b)
    else:
        print(b, a)
import numpy as np
import math

n , k = list(map(int, input().split()))
kaijou = np.zeros((n + 1,k + 1))
def combi(a,b):
    if kaijou[a][b] == 0:
        kaijou[a][b] = math.factorial(a) / (math.factorial(b) * math.factorial(a-b))
    return kaijou[a][b]
i = 2
mod = 10 ** 9 + 7
for i in range(1, k + 1):
    if n - k + 1 >= i:
        print(int(combi(n - k + 1,i) * combi(k - 1, i - 1) % mod))
    else:
        print(0)

### FIXED CODE ###

import numpy as np
import math

n , k = list(map(int, input().split()))
def combi(a,b):
    return  math.factorial(a) // (math.factorial(b) * math.factorial(a-b))
i = 2
mod = 10 ** 9 + 7
for i in range(1, k + 1):
    if n - k + 1 >= i and k - 1 >= i - 1:
        print(int(combi(n - k + 1,i) * combi(k - 1, i - 1) % mod))
    else:
        print(0)
x = input().split(" ")
a = int(x[0])
b = int(x[1])

ans = 0
num = 0
while num < 2:
    if a >= b:
        ans += a
        a -= 1
    else:
        asn += b
        b -= 1
    num += 1
print(ans)

### FIXED CODE ###

x = input().split(" ")
a = int(x[0])
b = int(x[1])

ans = 0
num = 0

while num < 2:
    if a >= b:
        ans += a
        a -= 1
    else:
        ans += b
        b -= 1
    num += 1
print(ans)