Harryxun/stf_run huggingface dataset:
# coding: utf-8
n,m=map(int,input().split())
g=[set() for i in range(n)]
revg=[set() for i in range(n)]
for i in range(n+m-1):
    a,b=map(int,input().split())
    a-=1
    b-=1
    g[a].add(b)
    revg[b].add(a)
p=0
while True:
    if len(revg[p])==0:
        break
    for nxt in revg[p]:
        p=nxt
        break
ans=[-1 for i in range(n)]
ans[p]=0
def check(pos):
    if len(g[pos])==0:
        return
    for nxt in g[pos]:
        revg[nxt].remove(pos)
    for nxt in g[pos]:
        if len(revg[nxt])==0 and ans[nxt]==-1:
            ans[nxt]=pos+1
            check(nxt)
check(p)
print(*ans,sep='\n')
        

### FIXED CODE ###

# coding: utf-8
import sys
sys.setrecursionlimit(100000)
n,m=map(int,input().split())
g=[set() for i in range(n)]
revg=[set() for i in range(n)]
for i in range(n+m-1):
    a,b=map(int,input().split())
    a-=1
    b-=1
    g[a].add(b)
    revg[b].add(a)
p=0
while True:
    if len(revg[p])==0:
        break
    for nxt in revg[p]:
        p=nxt
        break
ans=[-1 for i in range(n)]
ans[p]=0
def check(pos):
    for nxt in g[pos]:
        revg[nxt].remove(pos)
    for nxt in g[pos]:
        if len(revg[nxt])==0 and ans[nxt]==-1:
            ans[nxt]=pos+1
            check(nxt)
check(p)
print(*ans,sep='\n')
n,k =  map(int,input().split())
A = list(map(int,input().split()))

l = min(A)//(k+1) 
r = max(A)
m = (l+r)//2+1

while 1:
    
    m = (l+r)//2
    
    #m以下の長さにできるか判定
    
    # A_long = A[A>m]
    n= sum( [A[i]+0.1//m for i in range(len(A)) ] )
    
    # print(l,m,r,n)
    
    if n<=k:
        if r==m:
            break
        r=m-1
    else:
        if l==m:
            m=m+1
            break
        l=m+1
        

        
print(m)
    

### FIXED CODE ###

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

l = min(A)//(k+1) 
r = max(A)
m = (l+r)//2+1

while 1:
    
    m = (l+r)//2
    if m==0:
        m=1
        break

    
    #m以下の長さにできるか判定
    
    # A_long = A[A>m]
    n= sum( [  int((A[i]-0.1)//(m)) for i in range(len(A)) ] )
    
    # print(l,m,r,n)
    
    if n<=k:
        if r==m:
            break
        r=m-1
    else:
        if l==m:
            m+=1
            break
        l=m+1
        

        
print(m)
s=input()
w=["dream","dreamer","erase","eraser"]
while True:
    if len(s)==0:
        print("YES")
        exit()
    if len(s)<=4:
        print("NO")
        exit()
    


    if s[0:5]==w[0]:
        if s[5:7]=="er": #dremaerかeraserかerase
            if s[7]=="a": #erはeraseかeraserのer
                s=s[5:]
            else:
                s=s[7:]
        else:
            s=s[5:]

    elif s[0:5]==w[2]:
        if s[5]=="r": 
            s=s[6:]
        else:
            s=s[5:]
    else:
        print("NO")
        exit()

    if len(s)==0:
        print("YES")
        exit()
    #print(s)

### FIXED CODE ###

s=input()
w=["dream","dreamer","erase","eraser",""]
while True:
    

    if s[0:5]==w[0]:
        if s[5:7]=="er": #dremaerかeraserかerase
            if s[7]=="a": #erはeraseかeraserのer
                s=s[5:]
            else:
                s=s[7:]
        else:
            s=s[5:]

    elif s[0:5]==w[2]:
        if s[5]=="r": 
            s=s[6:]
        else:
            s=s[5:]
    else:
        print("NO")
        exit()

    if len(s)<=7:
        if s in w:
            print("YES")
            exit()
        else:
            print("NO")
            exit()
    
    #print(s)
a,b=map(int,input().split())
ans=0
c=1
while c<b:
    c-=1
    c+=a
    ans+=1
print(ans)

### FIXED CODE ###

a = input()
b = input()
c = 0
for i in range(3):
  if a[i] == b[i]:
    c += 1
print(c)
a,b=(int(x) for x in input().split())
print(a)
print(b)

am=int(100/8*a)
al=int(100/8*(a+1))
if (a%4)==0:
       al=al-1

bm=int(10*b)
bl=int(10*(b+1))-1

#print (am,al)
#print (bm,bl)
for ia in range(am,al+1):
       for ib in range(bm,bl+1):
       		if ia==ib:
       			print (ia)
       			exit()
      
print -1

### FIXED CODE ###

str=input()
if str=="AAA" or str=="BBB":
  print ("No")
else:
  print ("Yes")
import numpy as np

N, W = map(int, input().split())
dp = np.zeros((N+1, W+1))  #i個目の品物までで重さw以下のときの価値の最大値 
"""
dp[i, wi:W+1] = max(i番目の重さwiの品物を入れた場合, 入れなかった場合)
         = np.max(dp[i-1, :W-wi+1] + v, dp[i-1, wi:W+1])
"""
for i in range(1, N+1):
    wi, vi = map(int, input().split())
    for k in range(1, i+1):
        tmp = np.maximum(dp[i-k, :W-wi+1] + vi, dp[i-k, wi:W+1])
        dp[i, wi:W+1] = np.maximum(dp[i, wi:W+1], tmp)
    

print(int(dp[-1,-1]))


### FIXED CODE ###

N, W = map(int, input().split())
#i個目の品物までで重さw以下のときの価値の最大値 
dp = [[0]*(W+1) for _ in range(N+1)]
"""
dp[i, wi:W+1] = max(i番目の重さwiの品物を入れた場合, 入れなかった場合)
         = np.max(dp[i-1, :W-wi+1] + v, dp[i-1, wi:W+1])
"""

for i in range(1, N+1):
    w, v = map(int, input().split())

    for j in range(W+1):
        if j - w >= 0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-w] + v)
        else:
            dp[i][j] = dp[i-1][j]

print(dp[-1][-1])
a,b = int(input().split())
print((b-a)*(b-a-1)//2 - a)

### FIXED CODE ###

a,b = map(int, input().split())
print((b-a)*(b-a-1)//2 - a)
a,b,c,d=map(int,input().split())
import numpy as np
X0=np.zeros((a, d),int)
X1=np.zeros((c, d),int)
X2=np.zeros((c, d),int)
X0[a-1][b-1]=1
for j in range(b,d):
  if d>b:
    X0[a-1][j]=(X0[a-1][j-1]*(a-1))% 998244353
    X1[a-1][j]=((X0[a-1][j-1]+X1[a-1][j-1]*(a-1)))% 998244353
    X2[a-1][j]=(X1[a-1][j-1]+(X2[a-1][j-1]*a))% 998244353
for i in range(a,c):
  if c>a:
    for j in range(b,d+1):
      if i>a:
        X1[i][j-1]=((X1[i-1][j-1]+X2[i-1][j-1])*j) % 998244353
      else:
        X1[i][j-1]=((X0[i-1][j-1]+X1[i-1][j-1]+X2[i-1][j-1])*j) % 998244353
      if j>=2:
        X2[i][j-1]=(X1[i][j-2]+X2[i][j-2] *(i+1)) % 998244353
if a==c:
  print((X0[c-1][d-1]+X1[c-1][d-1]+X2[c-1][d-1])%998244353)
else:
  print((X1[c-1][d-1]+X2[c-1][d-1])%998244353)

### FIXED CODE ###

a,b,c,d=map(int,input().split())
def amari(a):
  return a % 998244353
X0=[[0]*d for i in range(c)]
X1=[[0]*d for i in range(c)]
X2=[[0]*d for i in range(c)]
X0[a-1][b-1]=1
for j in range(b,d):
 X0[a-1][j]=amari(X0[a-1][j-1]*(a-1))
 X1[a-1][j]=amari(X0[a-1][j-1]+X1[a-1][j-1]*(a-1))
 X2[a-1][j]=amari(X1[a-1][j-1]+X2[a-1][j-1]*a)
for i in range(a,c):
 for j in range(b,d+1):
  X1[i][j-1]=amari((X0[i-1][j-1]+X1[i-1][j-1]+X2[i-1][j-1])*j)
  if j>=2:
   X2[i][j-1]=amari(X1[i][j-2]+X2[i][j-2] *(i+1))
print(amari(X0[c-1][d-1]+X1[c-1][d-1]+X2[c-1][d-1]))
import math
n, d = map(int, input().split())
print(math.ceil(n / (2d + 1)))

### FIXED CODE ###

import math
n, d = map(int, input().split())
print(math.ceil(n / (2 * d + 1)))
N, M, X = map(int, input().split())
C = [0] * N
AA = [list(map(int, input().split())) for i in range(N)]
for i in range(len(AA)):
    C[i] = AA[i][0]
    A[i] = AA[i][1:]
ans = sum(C) + 1
for p in range(2 ** N):
    Y = [0] * M
    cnt = 0
    for i, c in enumerate(C):
        if p % 2 == 1:
            cnt += c
            for j, a in enumerate(A[i]):
                Y[j] += a
        p //= 2
    ans = min(ans, cnt) if min(Y) >= X else ans
print(ans if ans <= sum(C) else -1)

### FIXED CODE ###

N, M, X = map(int, input().split())
C = [0] * N
A = [0] * N
AA = [list(map(int, input().split())) for i in range(N)]
for i in range(len(AA)):
    C[i] = AA[i][0]
    A[i] = AA[i][1:]
ans = sum(C) + 1
for p in range(2 ** N):
    Y = [0] * M
    cnt = 0
    for i, c in enumerate(C):
        if p % 2 == 1:
            cnt += c
            for j, a in enumerate(A[i]):
                Y[j] += a
        p //= 2
    ans = min(ans, cnt) if min(Y) >= X else ans
print(ans if ans <= sum(C) else -1)
n=input().split()
a=int(n[0])
b=float(n[1])
if b<1:
  print(int(a*b))
else:
  print(int(str(int(b*100)*a)[:-2]))



### FIXED CODE ###

from decimal import Decimal
a,b=map(Decimal,input().split())
print(int(a*b))
# -*- coding: utf-8 -*-
N = int(input())
a = list(map(int, input().split()))

if N % 2 == 0:
    print(" ".join(a[N::-2] + a[::2])
else:
    print(" ".join(a[N::-2] + a[1::2])


### FIXED CODE ###

# -*- coding: utf-8 -*-
N = int(input())
a = input().split()

if N % 2 == 0:
    b = a[N::-2] + a[::2]
else:
    b = a[N::-2] + a[1::2]

print(" ".join(b))
N = int(input())

ans = []

for i in range(1,10):
  if (1000 * i) - N  >= 0:
    ans.append((1000 * i) - N )
    
print(min(ans))

### FIXED CODE ###

N = int(input())

ans = []

for i in range(0,11):
  if (1000 * i) - N  >= 0:
    ans.append((1000 * i) - N )
    
print(min(ans))
def main():
    import sys
    input=sys.stdin.readline
    s=input()
    alpha="abcdefghijklmnopqrstuvwxyz"
    l=len(s)
    alpha2={j:i for i,j in enumerate(alpha)}
    memo=[[0]*26 for _ in range(l,-1,-1)]
    for i in range(26):
        memo[l][i]=l+1
    for i in range(l-1,-1,-1):
        for x,y in alpha2.items():  
            memo[i][y]=memo[i+1][y]
            memo[i][alpha2[s[i]]]=i+1
    
    search=[1]*(l+2)
    search[l+1]=0
    for i in range(l-1,-1,-1):
        m=max([memo[i][j] for j in range(26)])
        if m!=l+1:
            search[i]=search[m]+1
    
    n,seq=0,0
    ans_len=search[0]
    ans=""
    temp=0
    for i in range(ans_len):
        for j in range(26):
            n=memo[temp][j]
            seq=search[n]+i
            if seq+1==ans_len:
                ans+=alpha[j]
                temp=memo[temp][j]
                break
    print(ans)
if __name__=='__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    input=sys.stdin.readline
    s=input()
    alpha="abcdefghijklmnopqrstuvwxyz"
    l=len(s)
    alpha2={j:i for i,j in enumerate(alpha)}
    memo=[[0]*26 for _ in range(l,-1,-1)]
    for i in range(26):
        memo[l][i]=l+1
    for x,y in alpha2.items():
        for i in range(l-1,-1,-1):
            if s[i]==x:
                memo[i][y]=i+1
            else:
                memo[i][y]=memo[i+1][y]
    
    search=[1]*(l+2)
    search[l+1]=0
    for i in range(l-1,-1,-1):
        m=max([memo[i][j] for j in range(26)])
        if m!=l+1:
            search[i]=search[m]+1
    
    n,seq=0,0
    ans_len=search[0]
    ans=""
    temp=0
    for i in range(ans_len):
        for j in range(26):
            n=memo[temp][j]
            seq=search[n]+i
            if seq+1==ans_len:
                ans+=alpha[j]
                temp=memo[temp][j]
                break
    print(ans)
if __name__=='__main__':
    main()
list=[s for s in input()]
med=len(list)
print(list[0]+str(med)+list[med])

### FIXED CODE ###

list=[s for s in input()]
med=len(list)
med2=med-2
print(list[0]+str(med2)+list[med-1])
a, op, b = map(int, input().split())
op = str(op)
 
if p == "+":
  print(a+b)
else:
  print(a-b)

### FIXED CODE ###

a,o,b=input().split()
a=int(a)
b=int(b)
print(a+b if o=="+" else a-b)
H,W = map(int,input().split())
GRID = [list(input()) for _ in range(H)]

def dfs(h,w,c):
  if h == H - 1 and w == W - 1:
    return c + 1
  
  if GRID[h][w] != "#":
    return 0
  
  if H - 1 < h or W -1 < w:
    return 0
  
  right = dfs(h+1,w,c+1)
  down = dfs(h,w+1,c+1)
  c += max(right,down)

  return c

NUM = sum([GRID[x].count("#") for x in range(H)])

n = dfs(0,0,0)

if n == NUM:
  print("Possible")
else:
  print("Impossible")





### FIXED CODE ###

H,W = map(int,input().split())
GRID = [list(input()) for _ in range(H)]

def dfs(h,w,c):
  if h == H - 1 and w == W - 1:
    return c + 1

  if H - 1 < h or W -1 < w:
    return 0
  
  if GRID[h][w] != "#":
    return 0
  
  
  right = dfs(h+1,w,c+1)
  down = dfs(h,w+1,c+1)

  return max(right,down)

NUM = sum([GRID[x].count("#") for x in range(H)])

n = dfs(0,0,0)

if n == NUM:
  print("Possible")
else:
  print("Impossible")
N = input()
A = input()
B = input()

res = ""

if ((int)(B) - (int)(A))%2 == 0:
    res = "Alice"
else:
    res = "Borys"

print(res)


### FIXED CODE ###

moji = input()
moji = moji.split(" ")
N = moji[0]
A = moji[1]
B = moji[2]

res = ""

if ((int)(B) - (int)(A))%2 == 0:
    res = "Alice"
else:
    res = "Borys"

print(res)
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

a,b,c.d = map(int,input().split())
print(max(a*b,c*d))

### FIXED CODE ###

import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

a,b,c,d = map(int,input().split())
print(max(a*b,c*d))
N = int(input())
A = list(map(int,input().split()))
SUMA = 0
MOD = 10**9 + 7
C = [0] * (N-1) 
for i in range(N): 
    SUMA += A[i]
    C[i] = SUMA
ans = 0
for i in range(N-1):
    ans += A[i]*C[i]
    ans %= MOD 
print(ans)

### FIXED CODE ###

MOD = 10 ** 9 + 7  # MODは変数に入れてしまったほうが打ち間違えなくていいです

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

S = sum(A) % MOD
ans = 0

# A_Nも含まれてしまいますが、そのときはs=0なので問題ありません
for x in A:
    S -= x  # 自分と自分自身を掛けないように、先に引く必要があります
    S %= MOD  # MODはいちいち取っておくといいです
    ans += S * x
    ans %= MOD

ans %= MOD  # この行は完全に不要ですが、最後だけMODを取り忘れてWAになるミスは非常によくあるので、必要以上に取っておくと安心できます
print(ans)
n = int(input())
s = input()

if n % 2 != 0:
    print('No')
else:
    t = s[0:int(n / 2)]
    if t * 2 == s:
        print('Yes')
    else:
        print('No')
 =


### FIXED CODE ###

n = int(input())
s = input()

if n % 2 != 0:
    print('No')
else:
    t = s[0:int(n / 2)]
    if t * 2 == s:
        print('Yes')
    else:
        print('No')
n,a,b=map(int,input().split())
L=""
for _ in range(10**18):
  L += 'b'*a+'r'*b
print(L[:n].count('b'))

### FIXED CODE ###

n,a,b=map(int,input().split())
t= n//(a+b)
s = n%(a+b)
print(t*a + min(s,a))
N = int(input())
P = list(map(int, input().split()))

ans = 0

for i in range(N-2):
  if P[i] > P[i+1] and P[i+1] > P[i+2] or P[i] < P[i+1] and P[i+1] < P[i+2] or :
    ans += 1

print(ans)


### FIXED CODE ###

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

ans = 0

for i in range(N-2):
  if P[i] > P[i+1] and P[i+1] > P[i+2] or P[i] < P[i+1] and P[i+1] < P[i+2]:
    ans += 1

print(ans)
n, init = map(int, input().split())
x = list(map(int, input().split()))
def gcd(m,n):
    if n > m:
        gcd(n,m)
    elif m%n == 0:
        return n
    else:
        gcd(n,m%n)
def myabs(x):
    if x < 0:
        return -x
    else:
        return x
g = myabs(x[0]-init)
for i in range(n):
    if g == 1:
        break
    elif (myabs(x[i]-init) % g) != 0:
        g = gcd(g,x[i])
print(g)


### FIXED CODE ###

n, init = map(int,input().split())
x = list(map(lambda x: abs(int(x)-init), input().split()))
g = x[0]
def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x%y)
for i in range(1,n):
    g = gcd(g,x[i])
print(g)
import Counter
n=int(input())
s=[input() for i in range(n)]
c=Counter(s)
l=list(c)
l.sort(key=lambda x:x[1],reverse=True)
a=l[0][1]
i=0
while i<n and l[i][1]==a:
  print(l[i][0])
  i+=1

### FIXED CODE ###

from collections import Counter
n=int(input())
s=[input() for i in range(n)]
c=Counter(s)
t=[]
u=c.most_common()
v=u[0][1]
t.append(u[0][0])
for i in range(1,len(c)):
  a=u[i][1]
  if v>a:
    break
  else:
    t.append(u[i][0])
t.sort()
for i in t:
  print(i)
import sys

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(hp // attack)

print(ans)

### FIXED CODE ###

import math

hp , attack = map(int,input().split())

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.ceil(hp / attack))

print(int(ans))
# coding: utf-8

import sys
def input(): return sys.stdin.readline().strip()

# N = int(input())
# L = [int(x) for x in input().split()]
W, H, x, y = map(int, input().split())
# S = input()

ko = [-1] * 3
ko[0] = min(x * H, (W - x) * H)
ko[1] = min(y * W, (H - y) * W)
if y / x == (H - y) / (W - x):
    ko[2] = (W * H) / 2

maxm = max(ko)
print(maxm, 1 if ko.count(maxm) > 1 else 0)


### FIXED CODE ###

# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

W, H, x, y = LI()

print((W*H)/2, 1 if x*2 == W and y*2 == H else 0)
n = int(input())
    s = input()
    d = 0
    x = n
    for si in s:
        if si == "(":
            d += 1
        else:
            d -= 1
        x = min(d, x)
    print("(" * -x + s + ")" * (d - x))

### FIXED CODE ###

input()
s = input()
d = 0
x = 0
for c in s:
    if c == "(":
        d += 1
    else:
        d -= 1
    x = min(d, x)
print("(" * -x + s + ")" * (d - x))
n, k = map(int, input().split())
s = input().rstrip()

def findEx(s, f, pos, notfound):
  pos = s.find(f, pos)
  if pos == -1:
    pos = notfound
  return pos
    
ans = 0
left = 0
right = 0
while right < n:
    if k > 0:
        right = findEx(s, '01', right, n-1) + 1
        k = k - 1
        right = findEx(s, '10', right, n-1) + 1
        ans = max(ans, right - left)
    else:
        left = findEx(s, '01', left, n-1) + 1
        k = k + 1

print(ans)

### FIXED CODE ###

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

AB = []
AB += [A, B]

def push(AB):
  if AB[0] >= AB[1]:
    i = 0
  else:
    i = 1
  ret = AB[i]
  AB[i] -= 1
  return ret

s = 0
for _ in range(2):
	s += push(AB)

print(s)
N = int(input())
inp2 = int(input())
a = inp2.split()
count = 0
for i in range(int(N)):
	b = int(a[i])
	flag = True
	while flag:
		c = b/2
		if c.isinstance(c,int):
			count+=1
		else:
			flag = False

print(count) 

### FIXED CODE ###

N = int(input())
inp2 = input()
a = inp2.split()
count = 0
for i in range(int(N)):
	b = int(a[i])
	flag = True
	c = b
	while flag:
		c = c/2
		if c.is_integer():
			count+=1
		else:
			flag = False

print(count)
N = int(input())
L = [int(input()) for _ in range(5)]

m = min(L)
print(4 + (L+m-1)//m)


### FIXED CODE ###

N = int(input())
L = [int(input()) for _ in range(5)]

m = min(L)
print(4 + (N+m-1)//m)
S = input()
K = int(input())
if set(S) == "1":
    print(1)
elif S[0] == "1" and K > 1:
    ind = 1
    while S[ind] == "1":
        ind += 1
    print(S[ind])
else:
    print(S[0])


### FIXED CODE ###

S = input()
K = int(input())
if S[0] != "1":
    print(S[0])
else:
    ind = 0
    while S[ind] == "1" and ind < len(S) - 1:
        ind += 1
    if ind < K:
        print(S[ind])
    else:
        print("1")
n , k = list(map(int, input().split()))
kaijou = []
kaijou.append(1)
kaijou.append(1)
i = 2
while(i <= k + 1):
    kaijou.append(i * kaijou[i - 1])
    i += 1
for i in range(1, k + 1):
    print(int((kaijou[k - 1] / (kaijou[i - 1] * kaijou[n - i + 1]) * ( kaijou[n - k + 1] /  (kaijou[i] * kaijou[n - k + 1 - i]))) % 1000000007)

### 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)
a=int(input())                       
b=int(input())                       
if 1<=a and b<=10000:                
    if 0==a%2 or 0==b%2:             
        print('Even')                
    else:                            
        print('Odd')                 

### FIXED CODE ###

a, b = map(int, input().split())  
if 1<=a and b<=10000:             
    if (a*b)%2==0:                
        print('Even')             
    else:                         
        print('Odd')
n, x = map(int, input().split())
l = list(map(int, input().split()))

def iter(d, idx):
    return d+l[idx]

cnt = 0
d = 0
while True:
    d = iter(d, cnt)
    cnt += 1
    if d > x:
        break
print(cnt)


### FIXED CODE ###

n, x = map(int, input().split())
l = list(map(int, input().split()))

ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)
t = list(map(str, input()))
ans = t[:]

if t[0] == "?":
    if t[1] == "P":
        ans[0] = "D"
    else:
        ans[0] = "P"

for i in range(1, len(t)-1):
    if t[i] == "?":
        if t[i - 1] == "P":
            ans[i] = "D"
        else:
            if t[i + 1] == "D" or t[i + 1] == "?":
                ans[i] = "P"
            else:
                ans[i] = "D"

if t[-1] == "?":
    ans[-1] = "D"

print("".join(ans))


### FIXED CODE ###

t = list(map(str, input()))
ans = t[:]

if len(t) == 1:
    if t[0] == "?":
        ans[0] = "D"
else:
    if t[0] == "?":
        if t[1] == "P":
            ans[0] = "D"
        else:
            ans[0] = "P"

    for i in range(1, len(t)-1):
        if t[i] == "?":
            if ans[i - 1] == "P":
                ans[i] = "D"
            else:
                if t[i + 1] == "D" or t[i + 1] == "?":
                    ans[i] = "P"
                else:
                    ans[i] = "D"

    if t[-1] == "?":
        ans[-1] = "D"

print("".join(ans))
A, B, K = map(int, input().split())
yakusuu = []

for i in range(2, min(A, B)+1):
    if A % i == 0 and B % 2 == 0:
        yakusuu.append(i)

print(yakusuu[K-1])

### FIXED CODE ###

A, B, K = map(int, input().split())
yakusuu = []

for i in range(1, min(A, B)+1):
    if A % i == 0 and B % i == 0:
        yakusuu.append(i)

print(yakusuu[-K])
import fractions
import sys
#import numpy as np

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def main():
    N = int(input())
    for i in range(N):
        if i == 0:
            tmp = int(input())
        else:
            a = int(input())
            b = lcm_base(a, tmp)
            tmp = b
    print(b)

if __name__ == "__main__":
    main()


### FIXED CODE ###

import fractions
import sys
#import numpy as np

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def main():
    N = int(input())
    for i in range(N):
        if i == 0:
            tmp = int(input())
        else:
            a = int(input())
            b = lcm_base(a, tmp)
            tmp = b
    if N == 1:
        print(tmp)
    else:
        print(b)


if __name__ == "__main__":
    main()
import fractions
from functools import reduce
import math
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N,M = map(int,input().split())
List=list(map(int,input().split()))
aa = int(lcm_list(List) / 2)
cnt = 0
a=List[0]
while a%2 == 0:
  cnt+=1
  a /= 2
out = 0
if cnt == 0:
  out = 1
  cnt = 1
for i in range(len(List)):
  if List[i] % (2**cnt) == 1:
    out = 1
  elif List[i] % (2**(cnt+1)) == 1:
    out = 1

if out == 1:
  print(0)
else:
  print(int(math.ceil((M / aa)) // 2))

### FIXED CODE ###

N, M = map(int, input().split())
A = list(set(map(lambda x : int(x)//2, input().split())))
def gcd(x, y):
  return x if y == 0 else gcd(y, x % y)
def lcm(x, y):
  return (x * y) // gcd(x, y)
l = A[0]
for a in A[1:]:
  l = lcm(l, a)
ans = (M // l + 1) // 2
for a in A[1:]:
  if (l // a) % 2 == 0:
    ans = 0
    break
print(ans)
if input()=='Sunny':
  print('Cloudy')

elif input()=='Cloudy':
  print('Rainy')

else:
  print('Sunny') 

### FIXED CODE ###

w=input()

if w=='Sunny':
  print('Cloudy')

elif w=='Cloudy':
  print('Rainy')

else:
  print('Sunny')