Harryxun/stf_run huggingface dataset:
# YouTube
from collections import defaultdict

def dfs(u):
    ok[u] = 1
    for v in to[u]:
        if ok[v]: continue
        dfs(v)

def rdfs(u):
    ok[u] += 2
    for v in fr[u]:
        if ok[v] > 1: continue
        rdfs(v)

inf = 10 ** 9
to = defaultdict(list)
fr = defaultdict(list)
abc = []
n, m, p = map(int, input().split())
ok = [0] * n
for _ in range(m):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    c = -(c - p)
    to[a].append(b)
    fr[b].append(a)
    abc.append([a, b, c])
dfs(0)
rdfs(n - 1)
score = [inf] * n
score[0] = 0
for i in range(n):
    stop = True
    for a, b, c in abc:
        if ok[a] < 3 or ok[b] < 3: continue
        tmp = score[a] + c
        if tmp < score[b]:
            score[b] = tmp
            stop = False
    if stop:
        print(max(0, -score[n - 1]))
        break
else:
    print(-1)


### FIXED CODE ###

# YouTube
from collections import defaultdict
import sys

sys.setrecursionlimit(10 ** 6)

def dfs(u):
    ok[u] = 1
    for v in to[u]:
        if ok[v]: continue
        dfs(v)

def rdfs(u):
    ok[u] += 2
    for v in fr[u]:
        if ok[v] > 1: continue
        rdfs(v)

inf = 10 ** 9
to = defaultdict(list)
fr = defaultdict(list)
abc = []
n, m, p = map(int, input().split())
ok = [0] * n
for _ in range(m):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    c = -(c - p)
    to[a].append(b)
    fr[b].append(a)
    abc.append([a, b, c])
dfs(0)
rdfs(n - 1)
score = [inf] * n
score[0] = 0
for i in range(n):
    stop = True
    for a, b, c in abc:
        if ok[a] < 3 or ok[b] < 3: continue
        tmp = score[a] + c
        if tmp < score[b]:
            score[b] = tmp
            stop = False
    if stop:
        print(max(0, -score[n - 1]))
        break
else:
    print(-1)
import math

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

if K == 0:
	print(sum(A))

else:
	d = math.floor(math.log2(K)) + 1
	t = [0]*d

	for a in A:
		for i in range(d):
			if a == 0:
				break
			else:
				t[i] += a & 1
				a = a >> 1

	t = list(map(lambda x:N-2*x, t))


	w = []
	v = []

	for i in range(len(t)):
		if t[i] > 0:
			w.append(int(math.pow(2, i)))
			v.append(t[i])

	n = len(w)
	m = [[0]*(K+1) for i in range(n+1)]

	for i in range(1, n+1):
		for j in range(K+1):
			if w[i-1] <= j:
				remaining = j - w[i-1]
				m[i][j] = max(m[i-1][j] ,m[i-1][remaining] + w[i-1]*v[i-1])
			else:
				m[i][j] = m[i-1][j]

print(sum(A)+m[n][K])

### FIXED CODE ###

import operator

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

k = [((K+1)&(1<<i))>>i for i in range(40)]

m = [0]*40
for i in range(40):
	c = 0
	for a in A:
		c += (a&(1<<i))>>i
	
	if N < 2*c:
		m[i] = 0
	else:
		m[i] = 1

f = 0
b = [1<<i for i in range(40)]
for i in range(40):
	if k[i]==1:
		x = sum(map(operator.mul, m[:i]+[0]+k[i+1:], b))
		f = max(f, sum([x^a for a in A]))

print(f)
n=int(input())
ar=[]
c=0
m=0
cur=0
for i in range(0,n):
    ar.append(int(input()))
for i in range(0,n):
    cur=i
    for j in range(i+1,n):
        if(cur+1<n and ar[cur]>=ar[cur+1]):
            c+=1
            cur+=1
        else:
            break
    if(m<c):
        m=c
    c=0


print(m)

### FIXED CODE ###

n = int(input())
values = [float(s) for s in input().split(" ")]

start = 0
ans = 0

for i in range(1,n):
    if values[i] > values[i-1]:
        start = i
    ans = max(ans,i-start)
print(ans)
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in len(yakusu(a[i])):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

  


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
m=0
for i in range(n):
  while a[i]%2==0:
    a[i]=a[i]//2
    m+=1
print(m)
import fractions
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, N):
    ans = fractions.gcd(ans, a[i])
print(ans)

### FIXED CODE ###

import fractions
N = int(input())
a = list(map(int, input().split()))
ans = a[0]
for i in range(1, N):
    ans = fractions.gcd(ans, a[i])
print(ans)
lst = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
num = int(input())
print(lst[num])

### FIXED CODE ###

lst = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
num = int(input())
print(lst[num - 1])
#!/usr/bin/env python3
n,p= map(int,input().split())
s = input()
ans = 0
if p == 2 or p == 5:#右端を固定すれば2,5で割り切れるならそれ以降は全部いけるのでn-iをたす
    for i in range(n):
        if int(s[-1-i]) % p == 0:
            ans += n-i
    print(ans)
    exit()
else:
  s = s[::-1]#反転させてしたからみる
  cnt = [0]*p # pで割った時のあまり
  cnt[0] = 1 # 0の時はなにも取らない時全体も入るので+1する
  for i,c in enumerate(map(int,s)):#enumerateでiterator i , s[i]の値cを同時に取得
    k += (c*pow(10,i,p) + cnt[i-1])%p
    cnt[k] += 1
  for i in range(p):
    ans += cnt[i]*(cnt[i]-1) //2
  print(ans)



### FIXED CODE ###

#!/usr/bin/env python3
n,p= map(int,input().split())
s = input()
ans = 0
if p == 2 or p == 5:#右端を固定すれば2,5で割り切れるならそれ以降は全部いけるのでn-iをたす
    for i in range(n):
        if int(s[-1-i]) % p == 0:
            ans += n-i
    print(ans)
    exit()
else:
  s = s[::-1]#反転させてしたからみる
  cnt = [0]*p # pで割った時のあまり
  cnt[0] = 1 # 0の時はなにも取らない時全体も入るので+1する
  modp = 0
  for i,c in enumerate(map(int,s)):#enumerateでiterator i , s[i]の値cを同時に取得
    modp = (c*pow(10,i,p) + modp)%p
    cnt[modp] += 1
  for i in range(p):
    ans += cnt[i]*(cnt[i]-1) //2
  print(ans)
N = int(input())
an = list(map(int,input().split()))
solve = []

ans = 0
maxnum = 0

for i in range(1,N):
    print(str(maxnum)+'is maxnum' +str(i))
    if maxnum < an[i]:
        ans += max(an[maxnum:i+1]) - an[i]
        maxnum = an[i]
    if maxnum >= an[i]:
        ans += maxnum - an[i]
    print(str(ans) + 'is ans'+str(i))
print(ans)

### FIXED CODE ###

N = int(input())
an = list(map(int,input().split()))
solve = []

ans = 0
maxnum = 0

for i in range(N):
    maxnum = max(maxnum,an[i])
    ans += maxnum - an[i]
print(ans)
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,p=input2()
ans=((A*3)+p)//2
print(ans)

### FIXED CODE ###

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,p=input2()
ans=((a*3)+p)//2
print(ans)
n,k,q = tuple(map(int,input().split()))

check = []

for _ in [0]*q:
  check[int(input())-1]+=1
  
for i in range(n):
  judge = k-(q-check[i])
  if judge<=0:
    print("No")
  else:
    print("Yes")

### FIXED CODE ###

n,k,q = tuple(map(int,input().split()))

check = [0]*n

for _ in [0]*q:
  check[int(input())-1]+=1
  
for i in range(n):
  judge = k-(q-check[i])
  if judge<=0:
    print("No")
  else:
    print("Yes")
A,B=map(int, input().split())
S=input()
if S[A]=="-":
    n,m=S.split("-")
    if n.isdigit() and m.isdigit():
        print("Yes")
    else:
        print("No")
else:
    print("No")


### FIXED CODE ###

A,B=map(int, input().split())
S=input()
if S[A]=="-":
    st=S.split("-")
    n=st[0];m=st[1]
    if n.isdigit() and m.isdigit():
        print("Yes")
    else:
        print("No")
else:
    print("No")
N,M = map(int,input().split())
G = [[] for i in range(N)]
for i in range(M):
    a,b = map(int,input().split())
    a-=1
    b-=1
    G[a].append(b)
    G[b].append(a)

chk = [0 for i in range(N)]
L = [0 for i in range(N)]
def search(G,v,cnt,L,chk):
    chk[v]=1
    L[v]=cnt
    for tmp in G[v]:
        if chk[tmp]!=0:
            continue
        search(G,tmp,cnt,L,chk)

cnt = 0
for i in range(N):
    if chk[i]!=0:
        continue
    cnt += 1
    search(G,i,cnt,L,chk)

ans = 0

for c in range(cnt):
    res = 0
    for i in range(N):
        if (c+1)==L[i]:
            res +=1
    ans =max(ans,res)

print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
N,M = map(int,input().split())

class Union_Find():

    def __init__(self,n):
        self.n = n
        self.root = [-1]*(n+1)
        self.rank = [0]*(n+1)

    def find_root(self,x):
        if self.root[x]<0:
            return x
        else:
            self.root[x] = self.find_root(self.root[x])
            return self.root[x]

    def unite(self,x,y):
        x = self.find_root(x)
        y = self.find_root(y)

        if x==y:
            return
        elif self.rank[x]>self.rank[y]:
            self.root[x]+=self.root[y]
            self.root[y]=x
        else:
            self.root[y]+=self.root[x]
            self.root[x]=y

            if self.rank[x]==self.rank[y]:
                self.rank[y]+=1

    def same(self,x,y):
        return self.find_root(x)==self.find_root(y)

    def cnt(self,x):
        return -self.root[self.find_root(x)]

G=Union_Find(N)
ans=0
for i in range(M):
    a,b=map(int,input().split())
    G.unite(a,b)

for i in range(1,N+1):
    ans = max(ans,G.cnt(i))
print(ans)
m functools import reduce
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
 
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
 
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
 
n = int(input())
A = list(map(int, input().split()))
k = lcm_list(A)
r = 0
ln = list(range(n))
for i in ln:
    r += k//A[i]
print(r%(10**9+7))

### FIXED CODE ###

from functools import reduce
def lcm_base(x, y):
    return (x * y) // gcd(x, y)

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

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

n = int(input())
A = list(map(int, input().split()))
k = lcm_list(A)
r = 0
ln = list(range(n))
for i in ln:
    r += k//A[i]
print(r%(10**9+7))
S =map(int, input().split())
if S = "ABC":
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

s=input()

if s.find('B')==1:
  print('ARC')
else:
  print('ABC')
a,b,c=map(int,input().split())
if a <= c and c <= b:
  print(Yes)
elif b <= c and c <= a:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

a,b,c=map(int,input().split())
if a <= c and c <= b:
  print("Yes")
elif b <= c and c <= a:
  print("Yes")
else:
  print("No")
N = int(input())

c_list = [s for s in input()]
cr = list(reversed(c_list))
back = N - 1


def check(forward):
    global back
    for i in range(back, -1, -1):
        if back < forward:
            return -1
        if c_list[i] == "R":
            back -= 1
            return back + 1


count = 0
for i, c in enumerate(c_list):
    if c_list[i] == "W":
        temp = check(i + 1)
        if temp != -1:
            c_list[i] = "R"
            c_list[temp] = "W"
            count += 1
        else:
            break
print(count)

### FIXED CODE ###

N = int(input())

c_list = [s for s in input()]
back = N - 1


def check(forward):
    global back
    for i in range(back, -1, -1):
        if i < forward:
            return -1
        if c_list[i] == "R":
            back = i - 1
            return i
    return -1


count = 0
for i, c in enumerate(c_list):
    if c_list[i] == "W":
        temp = check(i + 1)
        if temp != -1:
            c_list[i] = "R"
            c_list[temp] = "W"
            count += 1
        else:
            break
print(count)
n=input()
power=1
for i in range(1,n+1):
  power=power*i
print(power%(10**9+7))

### FIXED CODE ###

n=int(input())
power=1
for i in range(1,n+1):
  power=(power*i)%(10**9+7)
print(int(power))
from collections import deque

queue = deque()

for _ in range(int(input())):
    commands = input().split(" ")
    if command[0] == "insert":
        queue.appendleft(commands[1])
    elif command[0] == "delete":
        try:
            queue.remove(commands[1])
        except ValueError:
            pass
    elif command[0] == "deleteFirst":
        queue.popleft()
    elif command[0] == "deleteLast":
        queue.pop()

print(" ".join(queue))

### FIXED CODE ###

import sys
from collections import deque

queue = deque()

for _ in range(int(sys.stdin.readline())):
    commands = sys.stdin.readline()[:-1].split(" ")
    if commands[0] == "insert":
        queue.appendleft(commands[1])
    elif commands[0] == "delete":
        try:
            queue.remove(commands[1])
        except ValueError:
            pass
    elif commands[0] == "deleteFirst":
        queue.popleft()
    elif commands[0] == "deleteLast":
        queue.pop()

print(" ".join(queue))
A,B,N = map(int, input().split(' '))
p = min(N,B)
if p%B == 0:
    print(int(A(p-1)/B))
else :
    print(int(A(p)/B))

### FIXED CODE ###

A,B,N = map(int, input().split())
c = min(N,B)
if c % B == 0:
    print(int(A*(c-1)/B))
else :
    print(int(A*(c)/B))
x,y = map (raw_input().split())
print = 2*x, 2*y

### FIXED CODE ###

a,b = map(int,raw_input().split())
print ("{0} {1}").format(a*b,2*a+2*b)
cin = open(0).read().strip().split('\n')
n, q = map(int, cin[0].split(' '))
ab = [tuple(map(int, a.split(' '))) for a in cin[1:n]]
px = [tuple(map(int, a.split(' '))) for a in cin[n:n+q]]

import sys
sys.setrecursionlimit(10**10)

def dfs(g, seen, idx):
    global score

    seen[idx] = True
    for i in g[idx]:
        if seen[i]: continue
        score[i] += score[idx]
        dfs(g, seen, i)

g = [[] for _ in range(n)]
for abi in ab:
    g[abi[0]-1].append(abi[1]-1)
    g[abi[1]-1].append(abi[0]-1)

score = [0]*n
for pxi in px:
    score[pxi[0]-1] += pxi[1]

seen = [False]*n
dfs(g, seen, 0)

print(' '.join(map(str, score)))

### FIXED CODE ###

cin = open(0).read().strip().split('\n')
n, q = map(int, cin[0].split(' '))
ab = [tuple(map(int, a.split(' '))) for a in cin[1:n]]
px = [tuple(map(int, a.split(' '))) for a in cin[n:n+q]]

import sys
sys.setrecursionlimit(10**9)

def dfs(g, seen, idx):
    global score

    seen[idx] = True
    for i in g[idx]:
        if seen[i]: continue
        score[i] += score[idx]
        dfs(g, seen, i)

g = [[] for _ in range(n)]
for abi in ab:
    g[abi[0]-1].append(abi[1]-1)
    g[abi[1]-1].append(abi[0]-1)

score = [0]*n
for pxi in px:
    score[pxi[0]-1] += pxi[1]

seen = [False]*n
dfs(g, seen, 0)

print(' '.join(map(str, score)))
import sys
sys.setrecursionlimit(2000)

def text_match_words(text, words):
	match_words = []
	for word in words:
		if word == text[:len(word)]:
			match_words.append(word)
	return match_words

def is_match_for(text, words):
	if "" == text: 
		return True
	else:
		match_words = text_match_words(text, words)
		if [] == match_words:
			return False
		else:
			return any([is_match_for(text[len(match_word):], words) for match_word in match_words])

words = ("dream", "dreamer", "erase", "eraser")

s = input()

if is_match_for(s, words):
	print("YES")
else:
	print("NO")

### FIXED CODE ###

import re

if re.match("(dream|dreamer|erase|eraser)*$", input()):
    print("YES")
else:
    print("NO")
a, b = map(int(split(input())))
 
if a == b:
    print("a" + " == " + "b")
elif a < b:
    print("a" + " < " + "b")
elif a > b:
    print("a" + " > " + "b")
else:
    print("timpo")

### FIXED CODE ###

a,b = map(int, input().split())
  
if a == b:
    print("a" + " == " + "b")
elif a < b:
    print("a" + " < " + "b")
else:
    print("a" + " > " + "b")
n = int(input())
a = list(map(int, input().split()))
b = [0 for _ in range(n)]
for i in range(1, n, -1):
    if sum(b[i::i])%2 == a[i]:
        b[i] = 0
    else:
        b[i] = 1
if sum(b)%2 == a[0]:
    b[0] = 0
else:
    b[0] = 1

if sum(b) != 0:
    print(sum(b))
    ans = []
    for i in range(n):
        if b[i] == 1:
            ans.append(i)
    print(ans.join(" "))
else:
    print("0")


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = [0 for _ in range(n)]
for i in range(n, 0, -1):
    if sum(b[i-1::i])%2 != a[i-1]:
        b[i-1] = 1

c = [i+1 for i in range(n) if b[i] == 1]
if len(c) != 0:
    print(len(c))
    print(*c)
else:
    print("0")
import sys
from fractions import gcd
def main(a, b):
    #a, b = [int(i) for i in sys.stdin.readline().split()]
    _gcd = gcd(a,b)
    #memo_ls = [0 for i in range(_gcd)]
    #memo_set = set()
    cnt = 0
    if _gcd == 1:
        print(1)
    else:
        div = 2
        while _gcd > 1:
            if _gcd % div == 0:
                while _gcd % div == 0:
                    _gcd /= div
                cnt += 1
            if div > 2:
              div += 2
            else:
	          div += 1
        #print(memo_set)
        print(cnt + 1)

if __name__ == "__main__":
    a, b = [int(i) for i in sys.stdin.readline().split()]
    main(a, b)

### FIXED CODE ###

import sys
from fractions import gcd
def prime_factorize(n):
    a = set()
    while n % 2 == 0:
        a.add(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.add(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.add(n)
    return a

def main(a, b):
    #a, b = [int(i) for i in sys.stdin.readline().split()]
    _gcd = gcd(a,b)
    #memo_ls = [0 for i in range(_gcd)]
    #memo_set = set()
    cnt = 0
    if _gcd == 1:
        print(1)
    else:
        res = prime_factorize(_gcd)
        print(len(res) + 1)
if __name__ == "__main__":
    a, b = [int(i) for i in sys.stdin.readline().split()]
    main(a, b)
x = input()
y = input()
z = input()
  
print(z + " " + x + " " + y)


### FIXED CODE ###

a,b,c=input().split()
 
print(str(c)+" "+str(a)+" " + str(b) + " ")
import sys
input = sys.stdin.readline
c = int(1)
N = int(input())
A = [int(x) for x in input().split()]
for k in range(N):
    c*=A[k]
if c>10**18:
    print(-1)
else:
    print(c)

### FIXED CODE ###

i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
c = i[0]*i[1]
print(c)
str = input()

split = str.split(" ")

N = int(split[0])
M = int(split[1])

HowMuch = [0 for i in range(N)]

split = input().split(" ")
for i in range(N):
  HowMuch[i] = int(split[i])
  
sortHow = HowMuch.sort(reverse = True)

if sortHow is None:
  sortHow = HowMuch[0]

if type(sortHow) is int:
  for i in range(M):
    sortHow //= 2
  print(sortHow)
else:
  for i in range(M):
    maxInd = sortHow.index(max(sortHow))
    sortHow[maxInd] //= 2
  print(sum(HowMuch))

### FIXED CODE ###

str = input()

if str == "Sunny":
  print("Cloudy")
elif str == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
n=int(input())
a=list([map(int,input().split()),_ for _ in range(1,n+1)])
a.sort()
l=(a[i][1] for i in range(n))
print(list(l))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(range(1,n+1))
ab=list(zip(a,b))
ab.sort()
l=(str(ab[i][1]) for i in range(n))
l=list(l)
print(' '.join(l))
from math import gcd

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

S = []
for i in range(N):
    S.append(abs(a-X[i]))

ans = S[0]
for i in range(1, N):
    ans = gcd(ans,S[i])

print(ans)

### FIXED CODE ###

from fractions import gcd

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

S = []
for i in range(N):
    S.append(abs(a-X[i]))

ans = S[0]
for i in range(1, N):
    ans = gcd(ans,S[i])

print(ans)
n, k = map(int, input().split())
p = list(map(int, input().split()))
p.sort()
price = 0

for i in range(k):
  price += p[i]
  
print(price)


### FIXED CODE ###

alpha = input()
print('A' if alpha.isupper() else 'a')
line = raw_input()

print line.reverse()

### FIXED CODE ###


line = raw_input()
print line[::-1]
n, q = map(int, input().split())
# tree = [list(map(int, input().split())) for i in range(n-1)]
edges = [set() for i in range(n)]
for _ in range(n-1):
    a, b= map(int,input().split())
    edges[a-1].add(b-1)
cnt = [0] * n

for _ in range(q):
    p, x = map(int, input().split())
    cnt[p-1] += x

l = [[0, cnt[0]]]
while len(l) != 0:
    a, b = l.pop()
    if a != 0:
        cnt[a] += b
    for i in edges[a]:
        l.append((i, cnt[a]))
print(*cnt)


### FIXED CODE ###

a = int(input())
s = input()

print(s if a >= 3200 else 'red')
import itertools
N=int(input())
an=[int(x) for x in map(int,input().split()[:N])]

ret=an[0]
for x in range(1,N):
    ret= ret[x] ^ ret

if ret==0:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import itertools
N=int(input())
an=[int(x) for x in map(int,input().split()[:N])]

ret=an[0]
for x in range(1,N):
    ret= an[x] ^ ret

if ret==0:
    print("Yes")
else:
    print("No")
a,b,c,x=map(int,input().split())
ans=0
for i in range(a+1):
    for j i range(b+1):
        for k in range(c+1):
            if x == 500*i+100*j+50*k:
                ans+=1
print(ans)


### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
x=int(input())
ans=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == 500*i+100*j+50*k:
                ans+=1
print(ans)
a,b=int(input())
res='Yes'
if a*b ==0: res='No'
if a*b >3: res='No'
print(res)

### FIXED CODE ###

a,b=map(int,input().split());print('No'if a*b%2==0else'Yes')
import sys
sys.stdin = open('input.txt', 'r')
sys.stdout = open('output.txt', 'w')


def isDivBy9(n):

    if (n == 0 or n == 9):
        return True
    if (n < 9):
        return False

    return isDivBy9((int)(n >> 3) - (int)(n & 7))


n = int(input())
if (isDivBy9(n)):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n = int(input())
if (n % 9 == 0):
    print("Yes")
else:
    print("No")
N, K = map(int,input().split())
print(K * ((K-1)**(N-1)))

### FIXED CODE ###

mylist = input().split()
print(len(set(mylist)))
d,t,s=map(int,input())
if(d/t>=s):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

d,t,s=map(int,input().split())
if(d/s<=t):
  print("Yes")
else:
  print("No")
import sys
from collections import deque
readline = sys.stdin.readline
dq = deque()
for _ in range(int(input())):
    ss = readline()
    if ss == "deleteFirst":
        del dq[0]
    elif ss == "deleteLast":
        del dq[-1]
    else:
        c, s = ss.split()
        s = int(s)
        if c == "insert":
            dq.appendleft(s)
        elif c == "delete":
            if s in dq:
                dq.remove(s)
print(*dq)



### FIXED CODE ###

import sys
from collections import deque
readline = sys.stdin.readline
dq = deque()
for _ in range(int(input())):
    c = readline().split()
    if c[0] == "deleteFirst":
        dq.popleft()
    elif c[0] == "deleteLast":
        dq.pop()
    else:
        if c[0] == "insert":
            dq.appendleft(c[1])
        elif c[0] == "delete":
            if c[1] in dq:
                dq.remove(c[1])
print(*dq)
n = int(input())
a = list(map(int, input().split())) 
if a.count(1) == 0:
    print(-1)
else: 
    for i in range(1, n):
        if not a.count(i) == 0:
            del a[:a.index(i)]
        else:
            y = i-1
            break
    print(n-y)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split())) 
a = tuple(a)
if a.count(1) == 0:
    print(-1)
else:
    s = 0
    t = 1
    for i in range(n):
        if a[i] == t:
            t += 1
        else: s += 1
    print(s)
s=int(raw_input())
h=s/3600
m=(s-3600*h)/60
print "%d:%d:%d"%(h,m,s-3600*h-60*m)

### FIXED CODE ###

x,y=map(int,raw_input().split())
print x*y,2*(x+y)
s=len(input())
2 print('x' * len(s))

### FIXED CODE ###

s = input().rstrip()
print('x' * len(s))
import numpy
N = int(raw_input())
A = map(int, raw_input().split())

def mul(x, y):
    return x * y

def nCr(n, r):
    if r == 0:
        return 1
    return reduce(mul, range(n, n - r, -1)) / reduce(mul, range(1, r+1))

def nCrMax(n):
    return nCr(n, n/2)

sortedA = sorted(A, reverse = True)

max = -1
for i in range(N - 1):
    n = sortedA[i]
    target = n/2
    newA = sortedA[:i] + sortedA[i+1:]
    r = newA[numpy.argmin(map(lambda x: abs(x - target), newA))]
    ncr = nCr(n, r)
    if(nCr > max):
        max = nCr
    else:
        break
    if nCrMax(sortedA[i+1]) < max:
        break

print n, r


### FIXED CODE ###

import numpy as np
import itertools

N = int(raw_input())
A = map(int, raw_input().split())

def mul(x, y):
    return x * y

def nCr(n, r):
    print n, r
    if r == 0:
        return 1
    if n/2 < r:
        return nCr(n, n-r)
    print range(n, n - r, -1), range(1, r+1)
    return np.prod(range(n, n - r, -1)) / np.prod(range(1, r+1))

def nCrMax(n):
    return nCr(n, n/2)

sortedA = sorted(A, reverse = True)

max = -1
for i in range(N - 1):
    n = sortedA[i]
    target = n/2
    newA = sortedA[:i] + sortedA[i+1:]
    r = newA[np.argmin(map(lambda x: abs(x - target), newA))]
    #ncr = nCr(n, r)
    #if(nCr > max):
    #    max = nCr
    #else:
    #    break
    #if nCrMax(sortedA[i+1]) < max:
    #    break
    break
    
print n, r