Harryxun/stf_run huggingface dataset:
from math import gcd
 
mod = 10**9+7
 
n = int(input())
a = list(map(int,input().split()))
d = 1
for i in range(n):
  d *= a[i] // gcd(a[i],d)
ans = 0
for i in range(n):
  ans += d//a[i]
 
print(ans%mod)


### FIXED CODE ###

def main():
  MOD=10**9+7
  N=int(input())
  A=list(map(int,input().split()))
  def lcm(a,N):
      from fractions import gcd
      x = a[0]
      y=  a[N//2]
      for i in range(1, N//2):
          x = (x * a[i]) // gcd(x, a[i])
          y = (y * a[i+N//2]) // gcd(y, a[i+N//2])
      y = (y * a[-1]) // gcd(y, a[-1])
      return (x*y)//gcd(x,y)
  z=lcm(A,N)
  ans=0
  for i in range(N):
    ans+=z//A[i]
  print(ans%MOD)
  
if __name__=='__main__':
  main()
a,b=input(),split()
c=int(a,16)
d=int(b,16)
print('>' if a>b else '<' if a<b else '=')

### FIXED CODE ###

a,b=input().split()
c=int(a,16)
d=int(b,16)
print('>' if c>d else '<' if c<d else '=')
import sys

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline


def main():
    H, W, K = map(int, readline().split())
    S = read().split()
    S = list(map(lambda x: x.decode('UTF-8'), S))

    A = np.zeros([H, W], dtype=np.int32)
    h_num = 0
    ih = []
    for h in range(H):
        ii = 0
        for w in range(W):
            if S[h][w] == "#":
                if ii != 0:
                    h_num += 1
                    A[h:, w:] = h_num
                    ih.append(h)
                else:
                    h_num += 1
                    A[h:, :] = h_num
                    ii += 1

    h_num = 0
    if A[0, 0] == 0:
        for h in range(ih[0]+1):
            ii = 0
            for w in range(W):
                if S[h][w] == "#":
                    if ii != 0:
                        h_num += 1
                        A[0:h, w:] = h_num
                    else:
                        h_num += 1
                        A[0:h, :] = h_num
                        ii += 1

    for h in range(H):
        print(' '.join(map(str, A[h])))


main()


### FIXED CODE ###

import sys

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline


def main():
    H, W, K = map(int, readline().split())
    S = read().split()
    S = list(map(lambda x: x.decode('UTF-8'), S))

    A = np.zeros([H, W], dtype=np.int32)
    h_num = 0
    ih = []
    for h in range(H):
        ii = 0
        for w in range(W):
            if S[h][w] == "#":
                if ii != 0:
                    h_num += 1
                    A[h:, w:] = h_num
                else:
                    h_num += 1
                    A[h:, :] = h_num
                    ii += 1
                    ih.append(h)

    h_num = 0
    if A[0, 0] == 0:
        for h in range(ih[0]+1):
            ii = 0
            for w in range(W):
                if S[h][w] == "#":
                    if ii != 0:
                        h_num += 1
                        A[0:h, w:] = h_num
                    else:
                        h_num += 1
                        A[0:h, :] = h_num
                        ii += 1

    for h in range(H):
        print(' '.join(map(str, A[h])))


main()
s=str(input())
s=list(s)
if s[len(s)-1]=="s":
  print("".join(s)+"es")
else:
  print("".join()+"s")

### FIXED CODE ###

s=str(input())
s=list(s)
if s[len(s)-1]=="s":
  print("".join(s)+"es")
else:
  print("".join(s)+"s")
def get_dist(p1, p2):
    x1, y1 = p1
    x2, y2 = p2
    return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5

def solve():
    from itertools import combinations
    from math import factorial
    from sys import stdin
    #f_i = stdin
    f_i = open('145_C_s3')#
    
    N = int(f_i.readline())
    points = tuple(tuple(map(int, f_i.readline().split())) for i in range(N))
    s = sum(get_dist(p1, p2) for p1, p2 in combinations(points, 2))
    print(s * 2 / N)

solve()

### FIXED CODE ###

def get_dist(p1, p2):
    x1, y1 = p1
    x2, y2 = p2
    return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5

def solve():
    from itertools import combinations
    from math import factorial
    from sys import stdin
    f_i = stdin
    
    N = int(f_i.readline())
    points = tuple(tuple(map(int, f_i.readline().split())) for i in range(N))
    s = sum(get_dist(p1, p2) for p1, p2 in combinations(points, 2))
    print(s * 2 / N)

solve()
N,C = map(int, input().split())
cost = [list(map(int, input().split())) for _ in range(C)]
color = [list(map(int, input().split())) for _ in range(N)]

mod3 = {0:[], 1:[], 2:[]}
for i in range(N):
    for j in range(N):
        m = (i+j)%3
        mod3[m].append(color[i][j])
        
from collections import Counter
from itertools import combinations, permutations
cnts = [Counter(mod3[i]) for i in range(3)]
# print(cnts)
ans = float('inf')
for comb in combinations(range(C), 3):
    for p in permutations(comb):
        cond = 0
        for i in range(3):
            for col in cnts[i].keys():
                cond += cnts[i][col]*cost[col][p[i]]
        ans = min(ans, cond)
        #print(cond, p)
print(ans)
    

### FIXED CODE ###

N,C = map(int, input().split())
cost = [list(map(int, input().split())) for _ in range(C)]
color = [list(map(lambda x:int(x)-1, input().split())) for _ in range(N)]

mod3 = {0:[], 1:[], 2:[]}
for i in range(N):
    for j in range(N):
        m = (i+j)%3
        mod3[m].append(color[i][j])
        
from collections import Counter
from itertools import combinations, permutations
cnts = [Counter(mod3[i]) for i in range(3)]
# print(cnts)
ans = float('inf')
for comb in combinations(range(C), 3):
    for p in permutations(comb):
        cond = 0
        for i in range(3):
            for col in cnts[i].keys():
                cond += cnts[i][col]*cost[col][p[i]]
        ans = min(ans, cond)
        #print(cond, p)
print(ans)
A, B, C, D = map(int, input().split())
opes = ['-', '+']
for op1 in range(2):
  for op2 in range(2):
    for op3 in range(2):
      result = 0
      if op1 == '-':
        result += A-B
      else:
        result += A+B
      if op2 == '-':
        result -= C
      else:
        result += C
      if op3 == '-':
        result -= D
      else:
        result += D
      if result == 7:
        print(str(A)+ope1+str(B)+ope2+str(C)+ope3+str(D))
        exit()

### FIXED CODE ###

N = input()
A, B, C, D = int(N[0]), int(N[1]), int(N[2]), int(N[3])
opes = ['-', '+']
for op1 in opes:
  for op2 in opes:
    for op3 in opes:
      result = 0
      if op1 == '-':
        result += A-B
      else:
        result += A+B
      if op2 == '-':
        result -= C
      else:
        result += C
      if op3 == '-':
        result -= D
      else:
        result += D
      if result == 7:
        print(str(A)+op1+str(B)+op2+str(C)+op3+str(D)+'=7')
        exit()
#!/usr/bin/env python3
import sys
import math

MOD = 1000000007  # type: int


def c(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def solve(N: int, K: int):
    for i in range(1,K+1):
        print((c(K-1, i-1) * c(N-K+1, i)) % MOD)
    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
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math

MOD = 1000000007  # type: int

def c(n, r):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = MOD #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


def solve(N: int, K: int):
    for i in range(1,K+1):
        print((c(K-1, i-1) * c(N-K+1, i)) % MOD)
    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
    K = int(next(tokens))  # type: int
    solve(N, K)

if __name__ == '__main__':
    main()
s=input()
t=input()

u=sorted([s])
v=sorted([t],reversed=True)

print("Yes" if u<v else "No")

### FIXED CODE ###

s=list(input())
t=list(input())

u=sorted(s)
v=sorted(t,reverse=True)

print("Yes" if u<v else "No")
a,b,c,d = map(int, input().split())

def afunc(a,b,c,d):
  alist = [a,b,c,d]
  pre = a
  for char in alist[1:3]:
    if pre == char:
      print("Bad")
      return
    else:
      pre = char
  print("Good")

afunc(a,b,c,d)

### FIXED CODE ###

S = str(input())
a = int(S[0])
b = int(S[1])
c = int(S[2])
d = int(S[3])

def afunc(a,b,c,d):
  alist = [a,b,c,d]
  pre = a
  for char in alist[1:4]:
    if pre == char:
      print("Bad")
      return
    else:
      pre = char
  print("Good")

afunc(a,b,c,d)
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/C-TaxIncrease.py
#
import sys
import math


def calc_notaxincluded_min_from_tax8(tax8: int) -> int:
    notaxincluded_min = int(tax8 / 0.08)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax8(tax8: int) -> int:
    notaxincluded_max = math.ceil((tax8 + 1) / 0.08)
    return notaxincluded_max


def calc_notaxincluded_min_from_tax10(tax10: int) -> int:
    notaxincluded_min = int(tax10 / 0.1)
    return notaxincluded_min


def calc_notaxincluded_max_from_tax10(tax10: int) -> int:
    notaxincluded_max = math.ceil((tax10 + 1) / 0.1)
    return notaxincluded_max


tax_8, tax_10 = map(int, sys.stdin.readline().split())
notax_min_from8 = calc_notaxincluded_min_from_tax8(tax_8)
notax_min_from10 = calc_notaxincluded_min_from_tax10(tax_10)
notax_max_from8 = calc_notaxincluded_max_from_tax8(tax_8)
notax_max_from10 = calc_notaxincluded_max_from_tax10(tax_10)

print(notax_min_from8)
print(notax_min_from10)
print(notax_max_fromA8)
print(notax_max_from10)


if (notax_min_from10 > notax_max_from8) or (notax_min_from8 > notax_min_from10):
    print(-1)
elif notax_min_from8 <= notax_min_from10:
    print(notax_min_from8)
else:
    print(notax_min_from10)


### FIXED CODE ###

#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /PycharmProjects/atcoder/C-TaxIncrease.py
#
A, B = map(int, input().split())
ans = -1
for i in range (1000 + 1):
    if (int(i*0.08) == A) and (int(i*0.10) == B):
        ans = i
        break
print(ans)
input_line = list(map(int, input().split()))
a = input_line[0]
b = input_line[1]

x = b - a

for i in range(0, x):
    x += i;
print(x-b)
    

### FIXED CODE ###

# coding: utf-8
# Your code here!

input_line = int(input())

if input_line < 1000:
    print("ABC")
else:
    print("ABD")
n = int(input())
sn = list(input() for i in range(n))
m = int(input())
mn = list(input() for i in range(m))

for i in range(len(sn)):
  ss.append(sn.count(sn[i])-mn.count(sn[i]))

print (max(ss),0)

### FIXED CODE ###

n = int(input())
sn = list(input() for i in range(n))
m = int(input())
mn = list(input() for i in range(m))
ss = []
for i in range(len(sn)):
  ss.append(sn.count(sn[i])-mn.count(sn[i]))
print (max(max(ss),0))
N = int(input())
A = list(map(int, input().split()))
def gcd(X):
    X.sorted
    m = min(X)
    for i in len(X):
        X[i] = X[i]%m
    if X == [0] * len(X):
        return m
    else:
        while 0 in X:
            X.remove(0)
        return gcd(X)

ans = 1
tmp = A
for i in range(N):
    A.pop(i)
    if gcd(A) > ans:
        ans = gcd(A)
    A = tmp
print(ans)
    

### FIXED CODE ###

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

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

L_gcd = [0]*(N+1)
R_gcd = [0]*(N+1)

for i in range(N):
    L_gcd[i+1] = gcd(L_gcd[i],A[i])
    R_gcd[N-i-1] = gcd(R_gcd[N-i],A[N-i-1])

ans = 0
for i in range(N):
    if gcd(L_gcd[i],R_gcd[i+1])>ans:
        ans = gcd(L_gcd[i],R_gcd[i+1])
    
print(ans)
import sys
sys.setrecursionlimit(10**6)

n = int(input())
a, b, c = [], [], []
# dp = [[None] * 3 for _ in range(n)]
dp = [[0] * 3 for _ in range(n)]
dp[0][0] = a[0]
dp[0][1] = b[0]
dp[0][2] = c[0]

for i in range(n):
    v1, v2, v3 = map(int, input().split())
    a.append(v1)
    b.append(v2)
    c.append(v3)

def solve(idx, ptn):
    if dp[idx][ptn] > 0:
        return dp[idx][ptn]

    # Select A(0)
    if ptn == 0:
        if idx == 0:
            return a[0]
        a1 = solve(idx - 1, 1) + a[idx]
        a2 = solve(idx - 1, 2) + a[idx]
        dp[idx][0] = max(a1, a2)
        return dp[idx][0]

    # Select B(1)
    if ptn == 1:
        if idx == 0:
            return b[0]
        b1 = solve(idx - 1, 0) + b[idx]
        b2 = solve(idx - 1, 2) + b[idx]
        dp[idx][0] = max(b1, b2)
        return dp[idx][1]

    # Select C(2)
    if ptn == 2:
        if idx == 0:
            return c[0]
        c1 = solve(idx - 1, 0) + c[idx]
        c2 = solve(idx - 1, 1) + c[idx]
        dp[idx][0] = max(c1, c2)
        return dp[idx][2]

ans1 = solve(n-1, 0)
ans2 = solve(n-1, 1)
ans3 = solve(n-1, 2)
print(max(ans1, ans2, ans3))


### FIXED CODE ###

n = int(input())
a, b, c = [],[],[]
dp = [[0 for i in range(3)] for j in range(n)]

for i in range(n):
    v1, v2, v3 = map(int, input().split())
    a.append(v1)
    b.append(v2)
    c.append(v3)

dp[0][0] = a[0]
dp[0][1] = b[0]
dp[0][2] = c[0]

for i in range(1, n):
    # dp[i][0] = max(dp[i-1][1] + a[i-1], dp[i-1][2] + a[i-1])
    # dp[i][1] = max(dp[i-1][0] + b[i-1], dp[i-1][2] + b[i-1])
    # dp[i][2] = max(dp[i-1][0] + c[i-1], dp[i-1][1] + c[i-1])
    dp[i][0] = max(dp[i-1][1] + a[i], dp[i-1][2] + a[i])
    dp[i][1] = max(dp[i-1][0] + b[i], dp[i-1][2] + b[i])
    dp[i][2] = max(dp[i-1][0] + c[i], dp[i-1][1] + c[i])

# print("dpx: " + str(dp[n-1][0]))
# print("dpy: " + str(dp[n-1][1]))
# print("dpz: " + str(dp[n-1][2]))

print(max(dp[n-1][0], dp[n-1][1], dp[n-1][2]))
"""
解説と提出 #5739708をもとに作成
"""


def solve():
    N = int(input())
    result = [-1] * N
    uvw_map = [[] for _ in range(N)]
    '''枝毎の距離相関図を作る'''
    for i in range(N - 1):
        u, v, w = map(int, input().split())
        u -= 1
        v -= 1
        uvw_map[u].append([v, w])
        uvw_map[v].append([u, w])
    # 木の頂点を求める
    # -> 任意の場所で良い. 1 とする.
    # 頂点から順に塗っていく
    result[0] = False
    result = paint(uvw_map, 0, result)
    for i in result:
        print(int(i))


def paint(uvw_map, num, result):
    # num に紐づくノードの一覧を取得する
    num_map = uvw_map[num]
    # num との距離に応じて色を決定する
    nums = []
    for v, w in num_map:
        if result[v] != -1:
            continue
        result[v] = result[num] if w % 2 == 0 else not(result[num])
        # # 色分けを行ったものについてのみ記録しておく(num')
        nums.append(v)
    # num' すべてに対して同様の操作を行う
    for n in nums:
        result = paint(uvw_map, n, result)
    return result


if __name__ == '__main__':
    solve()


### FIXED CODE ###

"""
解説と提出 #5739708をもとに作成
"""

import sys
sys.setrecursionlimit(10 ** 6)


def solve():
    N = int(input())
    result = [-1] * N
    uvw_map = [[] for _ in range(N)]
    '''枝毎の距離相関図を作る'''
    for i in range(N - 1):
        u, v, w = map(int, input().split())
        u -= 1
        v -= 1
        uvw_map[u].append([v, w])
        uvw_map[v].append([u, w])
    # 木の頂点を求める
    # -> 任意の場所で良い. 1 とする.
    # 頂点から順に塗っていく
    result[0] = False
    result = paint(uvw_map, 0, result)
    for i in result:
        print(int(i))


def paint(uvw_map, num, result):
    # num に紐づくノードの一覧を取得する
    num_map = uvw_map[num]
    # num との距離に応じて色を決定する
    nums = []
    for v, w in num_map:
        if result[v] != -1:
            continue
        result[v] = result[num] if w % 2 == 0 else not(result[num])
        # # 色分けを行ったものについてのみ記録しておく(num')
        nums.append(v)
    # num' すべてに対して同様の操作を行う
    for n in nums:
        result = paint(uvw_map, n, result)
    return result


if __name__ == '__main__':
    solve()
n,a,b = map(int,input().split())
print(min(n＊a,b))


### FIXED CODE ###

n,a,b = map(int,input().split())
print(min(n*a,b))
S = input()

S.replace("dream",'')
S.replace("dreamer",'')
S.replace("erase",'')
S.replace("eraser",'')

if len(S)==0:
    ans = YES
else:
    ans = NO

print(ans)


### FIXED CODE ###

S = input()
S = S.replace('eraser', '')
S = S.replace('erase', '')
S = S.replace('dreamer', '')
S = S.replace('dream', '')
if len(S) == 0:
    print('YES')
else:
    print('NO')
# coding: utf-8
# Your code here!
N=int(input())

if len(str(N))==1:
    ans=N
else:
    
    if 1==len(set(list(str(N))[1:])) and int(str(N)[2])==9:
        ans=9*(len(str(N))-1) + int(str(N)[0])
    else:
        ans=9*(len(str(N))-1) + int(str(N)[0])-1

print(ans)


### FIXED CODE ###

# coding: utf-8
# Your code here!
N=int(input())

if len(str(N))==1:
    ans=N
else:
    
    if 1==len(set(list(str(N))[1:])) and int(str(N)[1])==9:
        ans=9*(len(str(N))-1) + int(str(N)[0])
    else:
        ans=9*(len(str(N))-1) + int(str(N)[0])-1

print(ans)
C = input().replace(" ", "")
if "2" in c:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

C = map(str, input().split())
if "2" in C:
    print("No")
else:
    print("Yes")
import numpy as np
import copy
N, M, X = map(int, input().split())
C = np.zeros(N, dtype=np.uint16)
A = np.zeros([N, M], dtype=np.unt16)
skills = np.zeros(M, dtype=np.uint16)
sum_skills = np.zeros(M, dtype=np.uint32)
sum_A = np.zeros(N, dtype=np.uint32)

for n in range(N):
    CA = list(map(int, input().split()))
    C[n] = CA[0]
    A[n] = CA[1:]
    sum_skills += CA[1:]
    sum_A[n] = sum(CA[1:])


def check_skills(skills):
    return np.all(skills >= X)


if np.all(sum_skills >= X):
    pass
else:
    print("-1")
    exit()

results = []
book_sorted = np.argsort(sum_A)
for n in range(M):
    result = ([n], C[n].copy(), A[n].copy())
    results.append(result)

min_cost = np.sum(C)

while len(results) > 0:
    result = results.pop(0)
    if check_skills(result[2]):
        min_cost = min(min_cost, result[1])
    elif result[1] > min_cost:
        continue
    else:
        max_idx = max(result[0])
        for idx in range(max_idx+1, N):
            (idxes, total_cost, skill_values) = copy.copy(result)
            idxes = idxes + [idx]
            total_cost = total_cost + C[idx]
            skill_values = skill_values + A[idx]
            results.append((idxes, total_cost, skill_values))

print(min_cost)


### FIXED CODE ###

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

A = [[] for i in range(N)]
C = [0] * N
for i in range(N):
    c_as = list(map(int, input().split()))
    C[i], A[i] = c_as[0], c_as[1:]

INF = 10**9
ans = INF
for s in range(0, 1 << N):
    smart = [0] * M
    cost_sum = 0
    for i in range(N):
        if (s >> i) % 2 == 0:
            continue
        cost_sum += C[i]
        for j in range(M):
            smart[j] += A[i][j]
    ok = True
    for j in range(M):
        if smart[j] < X:
            ok = False
    if ok:
        ans = min(ans, cost_sum)
if ans == INF:
    ans = -1
print(ans)
n,m=map(int, input().split())
mt=[0,2,5,5,4,5,6,3,7,6]
a=sorted(map(int, input().split()))
dp=['']*(n+1)
dp[0]='*'
for i in range(n+1):
    if not dp[i]:continue
    for j in a:
        if i+mt[j]<n+1:
            dp[i+mt[j]]=str(j)+dp[i]
print(''.join(sorted(dp[-1][:-1])[::-1]))

### FIXED CODE ###

a,b=map(int, input().split())
if b%a==0:print(a+b)
else:print(b-a)
n = map(int, input().split())
a = 0
while n < 0:
    a += n
    n -= 1
print(a)

### FIXED CODE ###

n = int(input())
a = 0
while n > 0:
    a += n
    n -= 1
print(a)
n=int(input())
t,a=map(int,input().suplit())
h=list(input().suplit())
b=1
c=abs(t-h[0]*0.006-a)
for i in n :
  if(abs(t-h[i]*0.006-a)<c):
    b=i+1
    c=abs(t-h[i]*0.006-a)
  else:
    continue
print(b)  

### FIXED CODE ###

n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
b=1
c=abs(t-h[0]*0.006-a)
for i in range(n) :
  if(abs(t-h[i]*0.006-a)<c):
    b=i+1
    c=abs(t-h[i]*0.006-a)
  else:
    continue
print(b)
N = int(input())
A = [int(x) for x in input().split()]
L = [0] * 2 * N
R = [0] * 2 * N
for i in range(N):
    l = i + A[i]
    L[l] += 1
    r = i - A[i]
    R[r] += 1
ans = 0 
for i in range(N):
    ans += L[i] * R[i]
print(ans)


### FIXED CODE ###

N = int(input())
A = [int(x) for x in input().split()]
L = [0] * 2 * N
R = [0] * 2 * N
for i in range(N):
    l = i + A[i]
    if l < N: L[l] += 1
    r = i - A[i]
    if r > 0: R[r] += 1
ans = 0 
for i in range(N):
    ans += L[i] * R[i]
print(ans)
date = input().split("/")
    sum = int(date[0]) * 365 + int(date[1]) * 30 + int(date[2])

    if 737085 < sum:
        print("TBD")
    else:
        print("Heisei")

### FIXED CODE ###

date = input().split("/")
sum = int(date[0]) * 365 + int(date[1]) * 30 + int(date[2])

if 737085 < sum:
    print("TBD")
else:
    print("Heisei")
import sys; readline = sys.stdin.readline
from collections import deque


N = int(readline())
A = list(map(int, readline().split()))
P = 10**9 + 7


a = 1
state = [0, 0, 0]

for i in range(N):
    c = state.count(A[i]) 
    a *= c
    a %= P
    state[state.index(A[i])] = A[i] + 1

print(a)

### FIXED CODE ###

import sys; readline = sys.stdin.readline
from collections import deque


N = int(readline())
A = list(map(int, readline().split()))
P = 10**9 + 7


a = 1
state = [0, 0, 0]

for i in range(N):
    c = state.count(A[i]) 
    a *= c
    a %= P
    if c == 0:
        print(0)
        exit(0)
    state[state.index(A[i])] = A[i] + 1

print(a)
A=[int(input()) for i in range(5)]
K = int(input())

if(A[-1] - A[0] <= K):
  print("Yay!")
 else:
  print(":(")



### FIXED CODE ###

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

if(A[-1] - A[0] <= K):
  print("Yay!")
else:
  print(":(")
import sys
N,M = map(int,input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]

def comp(x,y):
    for i in range(M):
        for j in range(M):
            if A[x+i][y+j] != B[i][j]:
                return False
    return True

for i in range(N-M+1):
    for j in range(N-M+1):
        if comp(i,j):
            flag = True
            break
if flag:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N,M = map(int,input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]

def comp(x,y):
    for i in range(M):
        for j in range(M):
            if A[x+i][y+j] != B[i][j]:
                return False
    return True
flag = False
for i in range(N-M+1):
    for j in range(N-M+1):
        if comp(i,j):
            flag = True
            break
if flag:
    print('Yes')
else:
    print('No')
a, b, c = input().split()
num = a+b+c
if num % 4 == 0:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a, b, c = input().split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO")
import bisect
#import numpy as np
N,K=[int(_) for _ in input().split()]
if N==4:
    raise
#A = np.array([int(_) for _ in input().split()],dtype=int)
#A.sort()
A=sorted([int(_) for _ in input().split()])

#target以下の積がK個以上ある最小のtarget

def check(target):
    cnt=0
    for i, a in enumerate(A):
        if a < 0:
            il = bisect.bisect_left(A,  target / a)
            #il = np.searchsorted(A,target/a,side='left')
            #ilからiまで、ただしilがiを超えたら0
            d = max(i - il, 0)
        elif a > 0:
            ir = bisect.bisect_right(A, target / a)
            #ir = np.searchsorted(A,target/a,side='right')
            #0からirまで、ただしirがiを超えたらi
            d = min(ir, i)
        else:
            d = i if target >= 0 else 0
        #print(target,a,d)
        cnt+=d
    return cnt>=K

lb = -10**18-1
rb = 10 ** 18 + 1
# Min x for check(x) == True
while rb - lb > 1:
    mid = (rb + lb) // 2
    if check(mid):
        rb = mid
    else:
        lb = mid
print(rb)



### FIXED CODE ###

A, B, C = [int(_) for _ in input().split()]
if A == B == C:
    ans = 'No'
elif A == B or B == C or C == A:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)