Harryxun/stf_run huggingface dataset:
a, b = map(int, input().split())
print("Yay!") if a <= 8 and b <= 8 else print(":(
")


### FIXED CODE ###

a, b = map(int, input().split())
print("Yay!") if a <= 8 and b <= 8 else print(":(")
import bisect

N = int(input())
A = [int(i) for i in input().split()]
 
B = [0]
X = [0]
ans = 0
for i in range(N):
    X.append(X[i]+A[i])
    insert_index = bisect.bisect_left(B,X[i+1])
    ans += bisect.bisect_right(B,X[i+1])-insert_incex
    B.insert(insert_index,X[i+1])
 
print(ans)

### FIXED CODE ###

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

B = {}
B[0] = 1

s = 0
ans = 0

for a in A:
    s += a
    ans += B.get(s,0)
    B[s] = B.get(s,0)+1

print(ans)
D,G = map(int, input().split())
INF = 10**10
# 各点数を得るときの、最小の問題数
n = 3*10**4
dp = [INF] * n
dp[0] = 0
for i in range(1,D+1):
    p,c = map(int, input().split())
    c //= 100
    tmp = dp[:]
    for j in range(G//100+1):
        if tmp[j] == INF: continue
        for k in range(1,p+1):
            dp[j+i*k] = min(tmp[j]+k, dp[j+i*k])
        dp[j+i*p+c] = min(tmp[j]+p, dp[j+i*p+c])

ans = INF
for score in dp[G//100:]:
    if score == INF: continue
    ans = min(score, ans)
print(ans)

### FIXED CODE ###

# """
# コンプリートするものと、せざるものに分ける
# コンプリートしないものに関しては、得点の高い方から一個だけ潰す
# """

D, G = map(int, input().split())
ps_ini,cs = [], []
for i in range(D):
    p,c = map(int,input().split())
    ps_ini.append(p)
    cs.append(c)

q_min = 1000000
for i in range(2**D):
    Gtmp = G
    ps = [p for p in ps_ini]
    s = "{:010b}".format(i)[::-1]
    q_all = 0
    for j,(p,c) in enumerate(zip(ps,cs)):
        # ボーナスの考慮
        Gtmp -= (p*(j+1)*100+c)*int(s[j]) 
        q_all += p*int(s[j])
        ps[j] -= p*int(s[j])
    # print(s,ps)
    if Gtmp <= 0:
        q_min = min(q_min, q_all)
    else:
        # コンプしていない問題で一番大きいやつ
        ind = 0
        for i,p in enumerate(ps):
            if p != 0:
                ind = i
        # print(Gtmp,ind,Gtmp//((ind+1)*100))
        # 比較
        if Gtmp//((ind+1)*100) > ps[ind]:
            continue
        if Gtmp%((ind+1)*100) == 0:           #割り切れない
            q_all += (Gtmp//((ind+1)*100))
        else:                           #割り切れる
            q_all += (Gtmp//((ind+1)*100) + 1) #最大値をコンプする以外ありえん
        q_min = min(q_min, q_all)
print(q_min)
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
    sum%=J 
sum=sum*sum  
sum%=J  
s=0
for i in range(n):
    s+=A[i]**2
    s%=j  
ans=sum-j  
ans%=J  
print(ans)

### FIXED CODE ###

from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random
J=int(1e9)+7

###############################################################################\n=17
n=int(input())
A=INPUT()
sum=0
for i in range(n):
    sum+=A[i]
sum=sum*sum

s=0
for i in range(n):
    s+=A[i]**2

ans=(sum-s)//2
ans%=J
print(ans)
import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    t = input().strip()
    print('Yes' if any([s[-i:] + s[:-i] == t for i in range(len(s))]) 'No')


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    t = input().strip()
    print("Yes" if any([s[-i:] + s[:-i] == t for i in range(len(s))]) else "No")


if __name__ == "__main__":
    main()
import math

a, b, c, d = map(int, input().split())
# print(b - a + 1)
e = c * d // math.gcd(c, d)
cMax = math.ceil(a / c)
cMin = math.floor(b / c)
# print(cMin - cMax + 1)
dMax = math.ceil(a / d)
dMin = math.floor(b / d)
# print(dMin - dMax + 1)
eMax = math.ceil(a / e)
eMin = math.floor(b / e)
# print(eMin - eMax + 1)

print(b - a + 1 + eMin - eMax + 1 - (cMin - cMax + 1) - (dMin - dMax + 1))


### FIXED CODE ###

import math

a, b, c, d = map(int, input().split())
cd = (c * d) // math.gcd(c, d)
u = b//c + b//d - b//cd
l = (a-1)//c + (a-1)//d - (a-1)//cd

print(b - a + 1 - u + l)
n = int(input())
a = list(map(int, input().split()))
m = 1
for i in a:
  m = m*i
if m<= 10**18:
  print(m)
else:
  print(-1)

### FIXED CODE ###

A, B = list(map(int, input().split()))
print(A * B)
import sys
input = lambda : sys.stdin.readline().rstrip()
# 小さすぎても怒られるので
from collections import defaultdict
n = int(input())
sys.setrecursionlimit(max(1000, 2*n))

cs = [0] + [int(c) for c in input().split()]
ns = defaultdict(set)
for _ in range(n-1):
    a,b = [int(c) for c in input().split()]
    ns[a].add(b)
    ns[b].add(a)

ans = [0] * (n+1) # kを通らないパスの総数
def dfs(u, prev, ans, results):
    # result : {k: (kを通ってuで終わるパスの数=kを通らないと到達できない頂点数)}, (u以下の部分木のサイズ)
    k = cs[u]
    if len(ns[u])==1 and prev in ns[u]:
        eend, ss = {k : 1}, 1
    else:
        ss = 1
        eend = defaultdict(int)
        for v in ns[u]:
            if v==prev:
                continue
            end, s = results[v, u] #dfs(v, u, ans)
            ss += s
            tmp = s - end.get(k, 0)
            ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
            for kk,vv in end.items():
                if kk!=k:
                    eend[kk] += end[kk]
        eend[k] = ss
#     print(eend, ss, ans)
    return eend, ss

q = [(1, -1)] # now, prev
args = [None] * n
i = 0
while q:
    u, prev = q.pop()
    args[i] = (u,prev)
    i += 1
    for v in ns[u]:
        if prev==v:
            continue
        q.append((v, u))
results = {}

for u, prev in args[::-1]:
    results[u, prev] =  dfs(u, prev, ans, results)

for k in range(1, n+1):
    if k==cs[0]:
        continue
    tmp = s - end.get(k, 0)
    ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
    
total = int(n * (n+1) / 2)
for i in range(1, n+1):
    print(total - ans[i])

### FIXED CODE ###


import sys
# 小さすぎても怒られるので
from collections import defaultdict
n = int(input())
sys.setrecursionlimit(max(1000, 2*n))

cs = [0] + [int(c) for c in input().split()]
ns = defaultdict(set)
for _ in range(n-1):
    a,b = [int(c) for c in input().split()]
    ns[a].add(b)
    ns[b].add(a)

ans = [0] * (n+1) # kを通らないパスの総数
minus = [0] * (n+1) # uの部分木のうち
minus0 = defaultdict(int)
st = {k: [] for k in range(1, n+1)}
nextu = {}
def dfs(u, prev, ans):
    global minus, st, minus0
    k = cs[u]
    st[k].append(u)
    ss = 1
    for v in ns[u]:
        if v==prev:
            continue
        nextu[u] = v
        s = dfs(v, u, ans)
        ss += s
        tmp = s - minus[v]
        ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
    st[k].pop()
    if st[k]:
        minus[nextu[st[k][-1]]] += ss
    else:
        minus0[k] += ss
#     print(ss)
    return ss

dfs(1, -1, ans)
for k in range(1, n+1):
    tmp = n - minus0[k]
    ans[k] += (int(tmp * (tmp - 1) / 2) + tmp)
    
total = int(n * (n+1) / 2)
for i in range(1, n+1):
    print(total - ans[i])
while(1):
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a>b:
		a, b = b, a
	print (str(a)+" "+str(b))

### FIXED CODE ###

while(1):
	a, b = map(int, input().split())
	if a == 0 and b == 0:
		break
	if a>b:
		a, b = b, a
	print (str(a)+" "+str(b))
N,K=map(int,input().split())
td=[]
for i in range(N):
    t,d=map(int,input().split())
    td.append([t,d])
td.sort(key=lambda x:x[1],reverse=True)
A=td[:K]
B=[]
s2=set()
for i,j in td[K:]:
    if not(i in s2):
        s2.add(i)
        B.append([i,j])
s1=set()
n=0
C=[]
sum=0
for i,j in A:
    if not(i in s1):
        s1.add(i)
        n+=1
        sum+=j
    else:
        C.append([i,j])
        sum+=j
sum+=n**2
B.reverse()
D=[]
for i,j in B:
    if not(i in s1):
        D.append([i,j])
list=[sum]
while(D):
    i,j=D.pop()
    list.append(list[-1]+2*n+1+(j-A[-1][1]))
    n+=1
    A.pop()
    if n==K:
        break
print(max(list))


### FIXED CODE ###

N,K=map(int,input().split())
td=[]
for i in range(N):
    t,d=map(int,input().split())
    td.append([t,d])
td.sort(key=lambda x:x[1],reverse=True)
A=td[:K]
B=[]
s2=set()
for i,j in td[K:]:
    if not(i in s2):
        s2.add(i)
        B.append([i,j])
s1=set()
n=0
C=[]
sum=0
for i,j in A:
    if not(i in s1):
        s1.add(i)
        n+=1
        sum+=j
    else:
        C.append([i,j])
        sum+=j
sum+=n**2
B.reverse()
D=[]
for i,j in B:
    if not(i in s1):
        D.append([i,j])
list=[sum]

while(C):
    if D:
        i,j=D.pop()
        list.append(list[-1]+2*n+1+(j-C[-1][1]))
        n+=1
    C.pop()
print(max(list))
n=int(input())
h=list(map(int,input().split()))

step=[]

for i in range(n-1):
  if h[i]<h[i+1]:
    step.append(0)
  else:
    step.append(1)

a=[i for i, x in enumerate(step) if x==0]

ans=[]

for i in range(len(a)):
  if i==0:
    d=a[0]
    ans.append(d)
  else:
    b=a[i]-a[i-1]
    ans.append(b)

ans.append((n-1)-a[-1])

print(max(ans)-1)

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))

step=[]

for i in range(n-1):
  if h[i]<h[i+1]:
    step.append(0)
  else:
    step.append(1)

a=[i for i, x in enumerate(step) if x==0]

ans=[]

for i in range(len(a)):
  if i==0:
    d=a[0]
    ans.append(d)
  else:
    b=a[i]-a[i-1]
    ans.append(b)
    

if not a:
  print(n-1)
else:
  ans.append((n-1)-a[-1])
  print(max(ans)-1)
import sys
H,W=map(int,input().split())
listA=[list(input()) for i in range(H)]
start=[0,0]
while 1:
  if start==[H-1,W-1]:
    print("Possible")
    sys.exit()
  if start[0]!=H-1 and listA[start[0]+1][start[1]]=="#" and listA[start[0]][start[1]+1]=="#":
    print("Impossible")
    sys.exit()
  if start[0]!=0 and start[1]!=0 and listA[start[0]-1][start[1]]=="#" and listA[start[0]][start[1]-1]=="#":
    print("Impossible")
    sys.exit()
  if start[0]!=H-1 and listA[start[0]+1][start[1]]=="#":
    start=[start[0]+1,start[1]]
    continue  
  if listA[start[0]][start[1]+1]=="#":
    start=[start[0],start[1]+1]    
  else:
    print("Impossible")

### FIXED CODE ###

import sys
H,W=map(int,input().split())
listA=[list(input()) for i in range(H)]
start=[0,0]
while 1:  
  if start[0]!=H-1 and start[1]!=W-1 and listA[start[0]+1][start[1]]=="#" and listA[start[0]][start[1]+1]=="#":
    print("Impossible")
    sys.exit()
  if start[0]!=0 and start[1]!=0 and listA[start[0]-1][start[1]]=="#" and listA[start[0]][start[1]-1]=="#":
    print("Impossible")
    sys.exit()
  if start==[H-1,W-1]:
    print("Possible")
    sys.exit()  
  if start[0]!=H-1 and listA[start[0]+1][start[1]]=="#":
    start=[start[0]+1,start[1]]
    continue  
  if start[1]!=W-1 and listA[start[0]][start[1]+1]=="#":
    start=[start[0],start[1]+1]    
  else:
    print("Impossible")
import math
c  = raw_input();
for var in range(0, int(c)) :
	n1 = raw_input();
	n2 = raw_input();
	sum = int(n1) + int(n2)
	if int(math.log10(sum)) + 1 > 80 :
		print("overflow")
	else :
		print(sum)
exit()

### FIXED CODE ###

for _ in range(int(input())) :
    n = int(input()) + int(input())
    if (n >= 10 ** 80) :
        print("overflow")
    else :
        print(n)
N, M = map(int, input().split())
XYZ = [list(map(int,input().split())) for _ in range(M)]

reach = [[] for _ in range(N)]
 
for i in XYZ:
    reach[i[0]-1].append(i[1])
    reach[i[1]-1].append(i[0])

approach = [False for _ in range(N)]

def change(reach, s):       
    approach[s-1] = True
    for i in reach[s-1]:
        if not approach[i-1] :
            change(reach, i)

ans = 0
for i in range(N) :
    if not approach[i]:
        change(reach, i+1)
        ans += 1

print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
N,M = list(map(int,input().split()))
XYZ = [list(map(int,input().split())) for _ in range(M)]

G = [[] for _ in range(N)]
 
for i in XYZ:
    G[i[0]-1].append(i[1])
    G[i[1]-1].append(i[0])
 
check = [False for _ in range(N)]
 
def DFS(G,s):
    check[s-1] = True
    for i in G[s-1]:
        if not check[i-1]:         
            DFS(G,i)
ans = 0
for i in range(N):
    if not check[i]:
        DFS(G,i+1)
        ans += 1

print(ans)
a,b=list(map(int,input().split()))
if abs(int((a-b)/2))=abs(int((b-a)/2)):
  print(int((a+b)/2))
else:
  print('IMPOSSIBLE')



### FIXED CODE ###

a,b=list(map(int,input().split()))
if (a+b)%2==0:
  print(int((a+b)/2))
else:
  print('IMPOSSIBLE')
def main():
    from builtin import min
    N = int(input())

    a = 0  # not carried
    b = 0  # carried
    while N != 0:
        t = N % 10
        a, b = min(a + t, b + (t + 1)), min(a + (10 - t), b + (10 - (t + 1)))
        N //= 10
    print(min(a, b + 1))


main()


### FIXED CODE ###

N = input()

N = '0' + N
result = 0
carry = 0
for i in range(len(N) - 1, 0, -1):
    c = int(N[i]) + carry
    n = int(N[i - 1])
    if c < 5 or (c == 5 and n < 5):
        result += c
        carry = 0
    else:
        result += 10 - c
        carry = 1
result += carry
print(result)
n=int(input())
lst=list(map(int,input().split()))

ans=[]
for i in range(len(lst)-1):
    cnt=0
    for j in range(i,len(lst)-1):
        if lst[j]>=lst[j+1]:
            cnt+=1
        else:
            break
    ans.append(cnt)
    
print(max(ans))

### FIXED CODE ###

n=int(input())
lst=list(map(int,input().split()))
ans=0
cnt=0
for i in range(len(lst)-1):
    if lst[i]>=lst[i+1]:
        cnt+=1
    else:
        cnt=0
    ans=max(cnt,ans)
print(ans)
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    from scipy.sparse.csgraph import connected_components  # https://note.nkmk.me/python-scipy-connected-components/
    from scipy.sparse import csr_matrix
    
    N, M = map(int, input().split())  # 頂点数、辺数
    A, B, C = [0] * M, [0] * M, [1] * M  # A[i]からB[i]へコストC[i]の有向辺。
    # ただし、connected_components()では有向グラフも無向グラフとして扱われる
    for i in range(M):
        A[i], B[i] ,_= map(int, input().split())
        A[i] -= 1  # indexを調整
        B[i] -= 1
    
    csr = csr_matrix((C, (A, B)), shape=(N, N))
    # nは連結成分の個数。labelは各頂点が属する連結成分のラベル
    n, labels = connected_components(csr)
    print(n)

    
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    from scipy.sparse.csgraph import connected_components  # https://note.nkmk.me/python-scipy-connected-components/
    from scipy.sparse import csr_matrix
    
    N, M = map(int, input().split())  # 頂点数、辺数
    A, B, C = [0] * M, [0] * M, [1] * M  # A[i]からB[i]へコストC[i]の有向辺。
    # ただし、connected_components()では有向グラフも無向グラフとして扱われる
    for i in range(M):
        A[i], B[i] ,_= map(int, input().split())
        A[i] -= 1  # indexを調整
        B[i] -= 1
    
    csr = csr_matrix((C, (A, B)), shape=(N, N))
    # nは連結成分の個数。labelは各頂点が属する連結成分のラベル
    n, labels = connected_components(csr)
    print(n)

    
resolve()
import math
import sys

X = int(input())
 
for i in range(-118, 119):
  for j in range(-119, 118):
    if math.pow(i, 5) - math.pow(j, 5) == X:
      print("%d %d" % (i, j))
      sys.exit()


### FIXED CODE ###

S = input()
 
if S == 'ABC':
  print('ARC')
else:
  print('ABC')
import sympy
N = int(input())
div_arr = sympy.divisors(N)

if len(div_arr) == 1:
    print(1)
elif len(div_arr) == 2:
    ans_num = max(div_arr)
    print(len(str(ans_num)))
else:
    memo = []
    if len(div_arr) % 2 == 0:
        last_idx = -1
        count = 0
        for i in range(len(div_arr)):
            count += 1
            if N == div_arr[i] * div_arr[last_idx] and count != len(div_arr) // 2:
                last_idx -= 1
                memo.append(len(str(div_arr[last_idx])))
            else:
                break
    else:
        target_index = len(div_arr) // 2
        memo.append(len(str(div_arr[target_index])))
    print(min(memo))

### FIXED CODE ###

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

    divisors.sort()
    return divisors
div_arr = make_divisors(N)

if len(div_arr) == 1:
    print(1)
elif len(div_arr) == 2:
    ans_num = max(div_arr)
    print(len(str(ans_num)))
else:
    memo = []
    if len(div_arr) % 2 == 0:
        last_idx = -1
        count = 0
        for i in range(len(div_arr)):
            count += 1
            if N == div_arr[i] * div_arr[last_idx] and count != len(div_arr) // 2:
                last_idx -= 1
                memo.append(len(str(div_arr[last_idx])))
            else:
                break
    else:
        target_index = len(div_arr) // 2
        memo.append(len(str(div_arr[target_index])))
    print(min(memo))
S,T = input().split()
mm = 0
for i in range(len(S)-len(T)):
    a = S[i:i+len(T)]
    mm_now = sum([x == y for x,y in [*zip(a,T)]])
    mm = max(mm_now, mm)
print(len(T) - mm)


### FIXED CODE ###

S = input()
T = input()
mm = 0
for i in range(len(S)-len(T)+1):
    a = S[i:i+len(T)]
    mm_now = sum([x == y for x,y in [*zip(a,T)]])
    mm = max(mm_now, mm)
print(len(T) - mm)
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil, floor, sqrt, gcd
from copy import deepcopy

def main():
    a,b = map(int, input().split())
    print(floor(a*b))

if __name__ == "__main__":
    main()

### FIXED CODE ###

import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil, floor, sqrt, gcd
from copy import deepcopy
from decimal import *

def main():
    a,b = map(Decimal, input().split())
    result = a*b
    print(int(result))
    
if __name__ == "__main__":
    main()
h, w = map(int, input().split())
S = ['']*h
for i in range(h):
    S[i] = input()

r = 'Yes'
for i in range(1, w-1):
    for j in range(1, h-1):
        if S[i][j]=='#':
            if S[i-1][j]=='#' or S[i+1][j]=='#' or S[i][j-1]=='#' or S[i][j+1]=='#':
                continue
            else:
                r = 'No'
print(r)

### FIXED CODE ###

h, w =map(int,input().split())
S=["."+input()+"." for i in range(h)]
S=["."*(w+2)]+S+["."*(w+2)]
r = 'Yes'
for i in range(h):
    for j in range(w):
        if S[i][j]=="#":
            if S[i-1][j]=="." and S[i+1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":
                r = 'No'
                break
print(r)
def ceil(a,b) :
    return (a + b - 1) // b

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

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

A.sort()

maxDigit = ceil(max(K,A[-1]), 2)

ans = 0

maxVal = [0] * maxDigit

# 前計算
for i in range(maxDigit) :
    count = 0
    mask = 2**i
    for a in A :
        count += (a & mask) // mask
    count = max(N - count, count)
    if i == 0 :
        maxVal[0] = count
    else :
        maxVal[i] = count * mask + maxVal[i-1]

for i in range(maxDigit-1, -1, -1) :  # 上からi+1桁まではKと同じ
    if not K & (2**i) > 0  :  # i桁目が0の場合
        continue

    mask = 2**(maxDigit - 1)

    sumXor = 0
    # i桁目までの値
    for j in range(maxDigit-1, i, -1) :
        valK = (K & mask)
        for n in range(N) :
            val = (A[n] & mask)
            if not valK == val :
                sumXor += mask
        mask = mask // 2

    # i桁目 0にする
    for n in range(N) :
        if A[n] & mask > 0 :
            sumXor += mask

    if i > 0 :
        sumXor += maxVal[i-1]

    ans = max(ans, sumXor)

print(ans)



### FIXED CODE ###

N , K = map(int,input().split())
 
A = list(map(int,input().split()))
 
A.sort()
 
maxDigit = max(K,A[-1]).bit_length()
 
# 前計算
maxVal = [0] * maxDigit
for i in range(maxDigit) :
    count = 0
    mask = 2**i
    for a in A :
        count += (a & mask) // mask
    count = max(N - count, count)
    if i == 0 :
        maxVal[0] = count
    else :
        maxVal[i] = count * mask + maxVal[i-1]
 
valK = [0] * (maxDigit + 1)
for i in range(maxDigit-1, -1, -1) :
    mask = 2**i
    maskK = K & mask
    sumK = 0
    for a in A :
        val = a & mask
        if maskK != val :
            sumK += mask
    valK[i] = sumK + valK[i+1]
 
ans = valK[0]  # X = K
for i in range(maxDigit-1, -1, -1) :  # 上からi+1桁まではKと同じ
    if not K & (2**i) > 0  :  # i桁目が0の場合
        continue
 
    sumXor = valK[i+1]
 
    # i桁目 0にする
    mask = 2**i
    for n in range(N) :
        if A[n] & mask > 0 :
            sumXor += mask
 
    if i > 0 :
        sumXor += maxVal[i-1]
 
    ans = max(ans, sumXor)
 
print(ans)
s=input()
ans=['KIHBR']
for i in range(1,16):
  flag=format(i,'b')
  tmp='A'*int(flag[0])+'KIH'+'A'*int(flag[1])+'B'+'A'*int(flag[2])+'R'+'A'*int(flag[3])
  ans.append(tmp)
if s in ans:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

s=input()
ans=['KIHBR']
for i in range(1,16):
  flag=format(i,'b')
  flag='0'*(4-len(flag))+flag
  tmp='A'*int(flag[0])+'KIH'+'A'*int(flag[1])+'B'+'A'*int(flag[2])+'R'+'A'*int(flag[3])
  ans.append(tmp)
if s in ans:
  print('YES')
else:
  print('NO')
n=int(input())

if n==0:
    print(0)
else:
    ans=""
    while n!=0:
        ans=str(n%2)+ans
        n=-1*(n//2)
ans=int(ans)
print(ans)

### FIXED CODE ###

n=int(input())

if n==0:
    ans="0"
else:
    ans=""
    while n!=0:
        ans=str(n%2)+ans
        n=-1*(n//2)
ans=int(ans)
print(ans)
from collections import defaultdict
from operator import itemgetter


def solve():
    N, M = map(int, input().split())
    xy_dict = defaultdict(int)
    xy = [[] for _ in range(N+1)]
    for _ in range(M):
        x, y, z = map(int, input().split())
        xy_dict[x] += 1
        xy_dict[y] += 1
        xy[x].append(y)
        xy[y].append(x)
    
    xy_sorted = sorted(xy_dict.items(), key=itemgetter(1), reverse=True)
    opened = [0 for _ in range(N+1)]
    ans = N
    for i in range(M):
        parent = xy_sorted[i][0]
        if opened[parent] == 1:
            continue
        opened[parent] = 1
        for child in xy[parent]:
            opened[child] = 1
        ans -= xy_dict[parent]
    print(ans)


if __name__ == '__main__':
    solve()

### FIXED CODE ###

from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components


def solve():
    N, M = map(int, input().split())
    X = [0 for _ in range(M)]
    Y = X[:]
    for i in range(M):
        X[i], Y[i], _ = map(lambda x: int(x)-1, input().split())
    
    graph = csr_matrix(([1]*M, (X, Y)), (N, N))
    ans = connected_components(graph)[0]
    print(ans)


if __name__ == '__main__':
    solve()
a, b, c, d = (int(i) for i in input().split())

if a != b:
  if: b != c:
      if: c != d:
          print("Good")
          return 0
        
print("Bad")


### FIXED CODE ###

a = input()

def check():
  for i in range(3):
    if a[i] == a[i+1]:
      print("Bad")
      return 
  print("Good")

check()
n = int(input())
list = [int(i) for i in input().split()]

list_odd = list[::2]
list_even = list[1::2]

def cnt_element(x):
    dict = {}
    for i in x:
        if i not in dict:
            dict[i] = 1
        else:
            dict[i] += 1
    return [(v,k) for k,v in dict.items()]

cnt_odd = sorted(cnt_element(list_odd),reverse=True)
cnt_even = sorted(cnt_element(list_even),reverse=True)

if len(cnt_odd) == len(cnt_even) == 1:
    if cnt_even[0][1] != cnt_odd[0][1]:
        ans = 0
    elif cnt_even[0][1] == cnt_odd[0][1]:
        ans = int(n / 2)
elif cnt_even[0][1] != cnt_odd[0][1]:
    ans = n - cnt_odd[0][0] - cnt_even[0][0]

print(ans)

### FIXED CODE ###

from collections import Counter

n = int(input())
v = [int(i) for i in input().split()]

ki = v[::2]
gu = v[1::2]

ki = Counter(ki)
gu = Counter(gu)

ki = ki.most_common()
gu = gu.most_common()

ans = 0

if ki[0][0] == gu[0][0]:
    if len(ki) == 1 and len(gu) == 1:
        ans = int(n / 2)
    else:
        if ki[1][1] > gu[1][1]:
            ans = n - ki[1][1] - gu[0][1]
        else:
            ans = n - ki[0][1] - gu[1][1]
else:
    ans = n - ki[0][1] - gu[0][1]

print(ans)
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

print(lcm(a,b))


### FIXED CODE ###

import fractions
 
A, B = map(int, input().split())
 
print((A * B) // fractions.gcd(A, B))