Harryxun/stf_run huggingface dataset:
if N = M
    print(yes)
else:
    print(no)


### FIXED CODE ###

n = 0
m = 0
ac = input()
n = ac.split()[0]
m = ac.split()[1]

if n == m:
    print("Yes")
else:
    print("No")
N, M = map(int,input().split())
List = [int(input()) for i in range(M)]

import math

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

result = 0

if M == 0:
    for i in range(math.floor((N-1)/2) + 1):
        result += cmb(N - List[M-1]-1-i,i) 
    result = result % 1000000007 
    print(result)

else:
    for i in range(math.floor((List[0]-1)/2) + 1):
        result += cmb(List[0]-1-i,i) 
            
    for i in range(M-1):
        if List[i+1] - List[i] == 1:
            result = 0
            break
        else:
            tmp = 0
            for j in range(math.floor((List[i+1]-List[i]-2)/2) + 1):
                tmp += cmb(List[i+1]-List[i]-2-j,j)
            result = result * tmp

    tmp = 0
    for i in range(math.floor((N - List[M-1]-1)/2) + 1):
        tmp += cmb(N - List[M-1]-1-i,i) 

    result = result * tmp
    result = result % 1000000007 
    print(result)
    
    

### FIXED CODE ###

N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
a.append(-1)

dp = [0 for i in range(N + 1)]
dp[0] = 1
point = 0
if a[point] == 1:
    dp[1] = 0
    point += 1
else:
    dp[1] = 1
for i in range(2, N + 1):
    if i == a[point]:
        dp[i] = 0
        point += 1
    else:
        dp[i] = (dp[i - 2] + dp[i - 1]) % (10 ** 9 + 7)
print(dp[N])
import sys

# a not yum, bc yum
a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if (a+b) >= c:
    print(b+c)
else:
    print(a+b+1+b)

### FIXED CODE ###

import sys


if __name__ == '__main__':
    # a not yum, bc yum
    a, b, c = [int(i) for i in input().split()]

    if (a+b) >= c:
        print(b+c)
    else:
        print(a+b+1+b)
def input():
    return sys.stdin.readline()[:-1]
sys.setrecursionlimit(300000)
class uf:
    def __init__(self,n):
        self.n=n
        self.l=[-1]*n
    def ro(self,n):         #root
        if self.l[n]<0:
            return n
        r=self.ro(self.l[n])
        self.l[n]=r
        return r
    def me(self,a,b):       #merge
        ra=self.ro(a)
        rb=self.ro(b)
        if self.l[ra]>self.l[rb]:
            ra,rb=rb,ra
        if ra!=rb:
            self.l[ra]+=self.l[rb]
            self.l[rb]=ra
    def size(self,n):
        return -self.l[self.ro(n)]
    def sa(self,a,b):       #same
        return self.ro(a)==self.ro(b)
    def rl(self):           #roots list
        return [i for i,v in enumerate(self.l) if v<0]
    
    def len(self):          #len(roots)
        return len(self.rl())
    def ul(self):
        d={n:i for i,n in enumerate(self.rl())}
        m=[[]for i in range(self.len())]
        for i in range(self.n):
            m[d[self.ro(i)]].append(i)
        return m
    def __str__(self):
        return f"{self.ul()}"
    def __setitem__(self,i,v):
        self.l[i]=v
N,Q=map(int,input().split())
g=uf(N)
for i in range(Q):
    t,u,v=map(int,input().split())
    if t:
        if g.sa(u,v):
            print(1)
        else:
            print(0)
    else:
        g.me(u,v)

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
sys.setrecursionlimit(300000)
class uf:
    def __init__(self,n):
        self.n=n
        self.l=[-1]*n
    def ro(self,n):         #root
        if self.l[n]<0:
            return n
        r=self.ro(self.l[n])
        self.l[n]=r
        return r
    def me(self,a,b):       #merge
        ra=self.ro(a)
        rb=self.ro(b)
        if self.l[ra]>self.l[rb]:
            ra,rb=rb,ra
        if ra!=rb:
            self.l[ra]+=self.l[rb]
            self.l[rb]=ra
    def size(self,n):
        return -self.l[self.ro(n)]
    def sa(self,a,b):       #same
        return self.ro(a)==self.ro(b)
    def rl(self):           #roots list
        return [i for i,v in enumerate(self.l) if v<0]
    
    def len(self):          #len(roots)
        return len(self.rl())
    def ul(self):
        d={n:i for i,n in enumerate(self.rl())}
        m=[[]for i in range(self.len())]
        for i in range(self.n):
            m[d[self.ro(i)]].append(i)
        return m
    def __str__(self):
        return f"{self.ul()}"
    def __setitem__(self,i,v):
        self.l[i]=v
N,Q=map(int,input().split())
g=uf(N)
for i in range(Q):
    t,u,v=map(int,input().split())
    if t:
        if g.sa(u,v):
            print(1)
        else:
            print(0)
    else:
        g.me(u,v)
S=input()
u=s[6:8]
U=int(u)
if U<=4:
    print('Heisei')
else:
    print('TBD')


### FIXED CODE ###

y,m,d = map(int,input().split("/"))
if m<=4:
  print('Heisei')
else:
  print('TBD')
n, m=map(int, input().split())
#for i in range(n):
l=[]

for i in range(n):
  l.append(list(map(int, input().split())))
l = sorted(l, reverse=False)  
def fns(hon, n, mon):
  if hon==m:
    return mon
  elif hon>m:
    return mon-(hon-m)*l[n-1][0]
  else:
    return fns(hon+l[n][1], n+1, mon+l[n][1]*l[n][0])
print(fns(0, 0, 0))


### FIXED CODE ###

n, m=map(int, input().split())
l=[]
for i in range(n):
  l.append(list(map(int, input().split())))
l = sorted(l, reverse=False)  
#print(l)
drinks=0
ttl=0
add=0
for i in range(n):
  add=min(m-drinks, l[i][1])
  ttl=ttl+add*l[i][0]
  drinks+=add
  if drinks==m:
    print(ttl)
    exit()
h0, w0, k0 = [ int(x) for x in input().split() ]
    buf = {}
    for i in range(h0):
      buf[1 << w0] = { 1 << j for j,x in enumerate(input()) if x == '#' }
    found = 0
    for i in range(1, 1 << h0):
      idx = {}
      for k,v in buf.items():
        if k & i == 0: continue
        for v in vs: idx[v] = idx.get(v, 0) + 1
      for j in range(1, 1 << w0):
        n = sum([ v for k,v in idx.items() if k & j ])
        if n == k0: found += 1
    print(found)

### FIXED CODE ###

h0, w0, k0 = [ int(x) for x in input().split() ]
found, buf = 0, {}
for i in range(h0): buf[1 << i] = { 1 << j for j,x in enumerate(input()) if x == '#' }
for i in range(1, 1 << h0):
  idx = {}
  for k,vs in buf.items():
    if k & i == 0: continue
    for v in vs: idx[v] = idx.get(v, 0) + 1
  for j in range(1, 1 << w0):
    n = sum([ v for k,v in idx.items() if k & j ])
    if n == k0: found += 1
print(found)
# -*- coding: utf-8 -*-
#import math

# 整数の入力
station = input()

if(station[0] != station[1] || station[0] != station[2]):
  print("No")
else:
  print("Yes")


### FIXED CODE ###

# -*- coding: utf-8 -*-
#import math

# 整数の入力
station = input()

if(station[0] != station[1] or station[0] != station[2]):
  print("Yes")
else:
  print("No")
data = input().split()
a = data[0]
b = data[1]
print(int(a) * int(b),2 * (int(a) + int(b))


### FIXED CODE ###

data = input().split()
a = data[0]
b = data[1]
print(int(a) * int(b), 2 * (int(a) + int(b)))
import sys
sys.setrecursionlimit(10000000000)

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

memo = [-1]*N 
def func(n,memo): 
  if n == 0: 
    memo[0] = 0 
    return memo[n] 
  elif n == 1: 
    memo[1] = abs(H[1]-H[0]) 
    return memo[n] 
  else: 
    if memo[n] != -1: 
      return memo[n] 
    else: 
      min_c = min(func(n-1,memo)+abs(H[n]-H[n-1]), func(n-2,memo)+abs(H[n]-H[n-2])) 
      memo[n] = min_c 
    return min_c 
  
print(func(N-1,memo)) 

### FIXED CODE ###

N =int(input())
H = list(map(int, input().split()))
#総数Nで、N番目の添字はN-1
flog = 0

#足場iにたどり着くための最小コストをリスト化
mincost= []
for i in range(N):
  if i == 0:
    c = 0
  elif i == 1:
    c = abs(H[1]-H[0])
  else:
    c = min(abs(H[i]-H[i-1])+mincost[i-1],abs(H[i]-H[i-2])+mincost[i-2])
  mincost.append(c)

print(mincost[N-1])
#coding:utf-8
N = int(input())
D = list(map(int,input().split()))
D = sorted(D)
idx = len(D) // 2
print(D[idx] - D[idx-1])

### FIXED CODE ###

#coding:utf-8
from collections import Counter

S = input()
cnt = Counter(list(S))
ls = list(cnt.values())
if (ls[0]==2 and ls[1]==2):
    print ("Yes")
else:
    print ("No")
N = int(input())

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

x = functools.reduce(operator.mul, A)
y = 10**18


if x > y:
    print("-1")
else:
    print(x)

### FIXED CODE ###

N = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 1
rec = True
for i in range(N):
    ans = ans * l[i]
    if ans > 10**18:
        rec = False
        break

if rec:
    print(ans)
else:
    print('-1')
a,sums= list(map(int,input().split()))
print(a)
yuki = sums//10000
taishi = (sums%10000) //5000
noguchi = (sums%5000) //1000
while a<yuki+taishi+noguchi:
  if a-(yuki+taishi+noguchi)%4==0:
    taishi-=1
    noguchi+=5
  else:
    yuki-=1
    taishi+=2
if a==yuki+taishi+noguchi:
  print(yuki,taishi,noguchi)
else print("-1 -1 -1")

### FIXED CODE ###

a,sums= list(map(int,input().split()))
yuki = sums//10000
taishi = (sums%10000) //5000
noguchi = (sums%5000) //1000
while a>yuki+taishi+noguchi:
  if ((a-(yuki+taishi+noguchi))%4==0)&(taishi>0):
    taishi-=1
    noguchi+=5
  elif yuki>0:
    yuki-=1
    taishi+=2
  else:
    break
if a==yuki+taishi+noguchi:
  print(yuki,taishi,noguchi)
else:
  print("-1 -1 -1")
s,w = map(int,input())
if w >= s:
    print('unsafe')
else:
    print('safe')


### FIXED CODE ###

s,w = map(int,input().split())
if w >= s:
    print('unsafe')
else:
    print('safe')
n=int(input()[:4]);a=set(input())
while a&set(str(n)):n+=1
print(n)

### FIXED CODE ###

n=int(input().split()[0]);a=set(input())
while a&set(str(n)):n+=1
print(n)
N = int(input())
A = map(int,input().split())

import math
from functools import reduce

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

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

print(gcd_list(A))

### FIXED CODE ###

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

from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

print(gcd_list(A))
#coding:utf-8
import sys
mo =" "
moji_m =""
while mo != "":
    mo = input().rstrip()
    moji_m += mo

moji = list(moji_m.lower())
moji_l = list("abcdefghijklmnopqrstuvwxyz")
moji_c = [0 for i in range(26)]

for i in moji:
    #??¢??????????????????????????????
    if i.isalpha() == False:
        pass
    else:
        moji_c[moji_l.index(i)] += 1

for i in range(26):
    print(str(moji_l[i]) + " : " +str(moji_c[i]))

### FIXED CODE ###

#coding:utf-8


mo =""
moji_m =""

while True:
    try:
        mo = input().rstrip().lower()
        moji_m += mo
    except:
        break


moji = list(moji_m.lower())
moji_l = list("abcdefghijklmnopqrstuvwxyz")
moji_c = [0 for i in range(26)]

for i in moji:
    #??¢??????????????????????????????
    if i.isalpha() == False:
        pass
    else:
        moji_c[moji_l.index(i)] += 1

for i in range(26):
    print(str(moji_l[i]) + " : " +str(moji_c[i]))
def main():
	import math
	a,b,c,d = map(int,input().split())
	ans = 0
	
	e = int((c*d) / math.gcd(c,d))

	i = int(b/c)
	t = int(b/d)
	l = int(b/e)

	while a <= i * c <= b:
		ans += 1
		i -= 1

	while a <= t * d <= b:
		ans += 1
		t -= 1
	
	while a <= l * e <= b:
		ans -= 1
		l -= 1

	print(int(len(range(a,b+1)))-ans)

if __name__ == "__main__":
	main()

### FIXED CODE ###

def main():
	a,b,c,d = map(int,input().split())

	#about c
	ans_c_a = (a-1)//c
	ans_c_b = b//c
	# print(ans_c_b)
	ans_c = ans_c_b - ans_c_a
	# print("ans_c = {}".format(ans_c))

	#about d
	ans_d_a = (a-1)//d
	ans_d_b = b//d
	ans_d = ans_d_b - ans_d_a
	# print("ans_d = {}".format(ans_d))

	#aboud c*d
	import fractions
	saisyou = (c * d) // fractions.gcd(c,d)
	# print(saisyou)
	ans_saisyou_a = (a-1)//saisyou
	ans_saisyou_b = b//saisyou
	ans_saisyou = ans_saisyou_b - ans_saisyou_a
	# print("ans_saisyou = {}".format(ans_saisyou))

	print(int( b-a+1 - (ans_c + ans_d - ans_saisyou) ))


if __name__ == '__main__':
	main()
n=int(input(n))
print(n//2+n%2)

### FIXED CODE ###

n = int(input())
print(n//2+n % 2)
a,b,c=input()
if a=='7' or b=='7' or c=='7':
    print(Yes)
else:
    print(No)

### FIXED CODE ###

N=input()
if N[0]=='7' or N[1]=='7' or N[2]=='7':
    print('Yes')
else:
    print('No')
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combi(n,r,mod=10**9+7):
    fac = [0]*(n+1)
    fac[0] = 1
    fac[1] = 1
    for i in range(2,n+1):
        fac[i] = fac[i-1] * i % mod
    return( ( fac[n] * modinv(fac[r]) )%mod * modinv(fac[n-r]) % mod)

N,K = map(int,input().split())
for j in range(1,K+1):
    print(combi(N-K+1,j) * combi(K-1,j-1) % mod)

### FIXED CODE ###

mod = 10**9+7
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

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

fac = [0]*(N+1)
fac[0] = 1
fac[1] = 1
for i in range(2,N+1):
    fac[i] = fac[i-1] * i % mod

def combi(n,r,mod=10**9+7):
    return( ( fac[n] * modinv(fac[r]) )%mod * modinv(fac[n-r]) % mod)

for j in range(1,K+1):
    if N - K + 1 < j:
        print(0)
    else:
        print(combi(N-K+1,j) * combi(K-1,j-1) % mod)
a, b = map(int, input().split())
C = []
D = []
for i in range(100):
  if math.floor(i*0.08) == a:
    C.append(i)
  if math.floor(i*0.1) == b:
    D.append(i)
if list(set(C) & set(D)):
  print('-1')
else:
  print(list(set(C) & set(D)))

### FIXED CODE ###

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

for i in range(1300):
  if math.floor(i*0.08) == a and math.floor(i*0.1) == b:
    print(i)
    exit()
print('-1')
n = int(input())
a = list(map(int, input().split()))

nums = [0]*(max(a)+1)
for i in a: nums[i] += 1

if n == 1:
  print(1)
  exit()
elif n == 2:
  if abs(a[0]-a[1]) <= 2: print(2)
  else: print(1)
  exit()
    
ans = 0
for i in range(1,n-1):
  if ans < nums[i-1] + nums[i] + nums[i+1]:
    ans = nums[i-1] + nums[i] + nums[i+1]

print(ans)

### FIXED CODE ###

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

nums = [0]*(max(a)+1)
for i in a: nums[i] += 1

if len(nums) <= 2:
  print(sum(nums))
  exit()
  
ans = 0
for i in range(1,max(a)):
  if ans < nums[i-1] + nums[i] + nums[i+1]:
    ans = nums[i-1] + nums[i] + nums[i+1]

print(ans)
r, g, b = map(int, input().split())
num = int(str(r)+str(g)+str(b)

if  num %4 == 0:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

r, g, b = map(int, input().split())
num = int(str(r)+str(g)+str(b))

if  num %4 == 0:
    print('YES')
else:
    print('NO')
l = ('A', 'T', 'C', 'G')
S = input()

ans = [0]
for i in range(len(S)):
    if S[i] in l:
        res += 1
    elif res != 0:
        ans.append(res)
        res = 0

print(max(ans))

### FIXED CODE ###

l = ('A', 'T', 'C', 'G')
S = input()

ans, res = 0, 0
for i in range(len(S)):
    if S[i] in l:
        res += 1
    else:
        ans = max(ans, res)
        res = 0
ans = max(ans, res)

print(ans)
import random
import copy
n = input()
ori = map(int, raw_input().split())
num = copy.deepcopy(ori)
while not sorted(num) == num:
    l = list()
    for i in xrange(n*2):
        if sorted(num) == num:
            break
        a = random.randint(0, n-1)
        b = random.randint(0, n-1)
        num[a] += num[b]
        l.append("%d %d" % ((a+1), (b+1)))
    else:
        num = copy.deepcopy(ori)

print len(l)
for i in l:
    print i


### FIXED CODE ###

n = input()
num = map(int, raw_input().split())
ma = max(num)
mi = min(num)
l = list()
if ma*mi < 0:
    if ma > abs(mi):
        index = num.index(ma)
    else:
        index = num.index(mi)
    for i in xrange(n):
        l.append("%d %d" % (index+1, i+1))
    b = num[index]
else:
    b = 0
    for i in num:
        if i:
            b = i
            break

if b == 0:
    pass
elif b < 0:
    for i in xrange(n-1, 0, -1):
        l.append("%d %d" % (i+1, i))
else:
    for i in xrange(0, n-1):
        l.append("%d %d" % (i+1, i+2))

print len(l)
for i in l:
    print i
from math import gcd

k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            ans+=gcd(math.gcd(i,j), l)
            #print(gcd(i,j,l))
print(ans)

### FIXED CODE ###

from math import gcd

k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            ans+=gcd(gcd(i,j), l)
            #print(gcd(i,j,l))
print(ans)
A, B = map(int, input().split()):

S = 1
ans = 0
while S < B:
	S += A - 1
	ans += 1
print (ans)

### FIXED CODE ###

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

S = 1
ans = 0
while S < B:
	S += A - 1
	ans += 1
print (ans)
BLOCK_WIDTH = 4
BLOCK_HEIGHT = 2
field = []
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
w = 0
h = 0
xg = 0
yg = 0

def main():
    global field, w, h, xg, yg
    while True:
        w, h = map(int, input().split())
        if w == 0 and h == 0:
            break
        xs, ys = map(int, input().split())
        xg, yg = map(int, input().split())
        n = int(input())
        field = [[0] * w for _ in range(h)]
        for i in range(n):
            c, d, x, y = map(int, input().split())
            arrangement(c, d, x, y)

        if dfs(field[xs][ys], xs, ys):
            print("OK")
        else:
            print("NG")


def arrangement(c, d, x, y):
    global field
    if d == 0:
        for i in range(BLOCK_HEIGHT):
            for j in range(BLOCK_WIDTH):
                field[y + i][x + j] = c
    else:
        for i in range(BLOCK_WIDTH):
            for j in range(BLOCK_HEIGHT):
                field[y + i][x + j] = c


def dfs(c, x, y):
    global field

    if x < 0 or x >= w or y < 0 or y >= h:
        return False
    if field[y][x] != c:
        return False
    if x == xg and y == yg:
        return True
    field[y][x] = -1
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        if dfs(c, next_x, next_y):
            return True

    return False


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys

BLOCK_WIDTH = 4
BLOCK_HEIGHT = 2
field = []
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
w = 0
h = 0
xg = 0
yg = 0
start_color = 0

def main():
    global field, w, h, c, xg, yg, start_color
    while True:
        w, h = map(int, input().split())
        if w == 0 and h == 0:
            break
        xs, ys = map(int, input().split())
        xg, yg = map(int, input().split())
        xs -= 1
        ys -= 1
        xg -= 1
        yg -= 1
        n = int(input())
        field = [[0] * w for _ in range(h)]
        for i in range(n):
            c, d, x, y = map(int, input().split())
            arrangement(c, d, x - 1, y - 1)

        start_color = field[ys][xs]
        if dfs(xs, ys):
            print("OK")
        else:
            print("NG")


def arrangement(c, d, x, y):
    if d == 0:
        [[draw(x + j, y + i, c) for j in range(BLOCK_WIDTH)] for i in range(BLOCK_HEIGHT)]
    else:
        [[draw(x + j, y + i, c) for j in range(BLOCK_HEIGHT)] for i in range(BLOCK_WIDTH)]


def draw(x, y, c):
    global field
    field[y][x] = c


def dfs(x, y):
    global field

    if x == xg and y == yg:
        return True
    if start_color == 0:
        return False
    field[y][x] = 0
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        if next_x < 0 or next_x >= w or next_y < 0 or next_y >= h:
            continue
        if field[next_y][next_x] != start_color:
            continue
        if dfs(next_x, next_y):
            return True

    return False


if __name__ == '__main__':
    main()
### 解答
N, K = map(int, input().split())
A = list(map(int, input().split()))

#B = [0]*N                                 # 記録用のリスト

for k in range(K):                        # 以降の操作をK回繰り返す
  B = [0]*N 
  for i in range(N):                      # 各電球によって照らされる範囲を考える
    start = max(0, i-A[i])                # 始点のインデックスは0かi-A[i]
    end = min(N, i+A[i]+1)                # 終点のインデックスはNかi+A[i]+1
    B[start] += 1                         # 始点に+1を記録する
    if end <= N - 1:
      B[end] -= 1                         # 終点に電球が存在する場合は-1を記録する
  bmin = B[0] 
  for i in range(1, N):                   # 累積和の計算
    B[i] = B[i-1] + B[i]
    bmin = min(B[i], bmin)
  A = B                                   # AをBで更新してつぎのループへ 
  if bmin == N:                        # すべての電球がN個の電球に照らされるタイミングでbreakする
    break

print(*A)                                 # リストAの中身を順に表示

### FIXED CODE ###

s=input()
print(s[:3])
import itertools

N,M,Q = list(map(int, input().split()))
C = []
for i in range(Q):
    C.append(list(map(int, input().split())))
    
res = 0
ls=list(range(1,M+1))

for a in itertools.combinations_with_replacement(ls, N):
    p = 0
    for c in C:
        if a[c[1]]-a[c[0]]==c[2]:
            p += c[3]
        res = max(res,p)

print(res)

### FIXED CODE ###

N,M,Q = list(map(int, input().split()))
C = []
for i in range(Q):
    C.append(list(map(int, input().split())))
    
import itertools
res = 0
ls=list(range(1,M+1))
for a in itertools.combinations_with_replacement(ls, N):
    p = 0
    for c in C:
        if a[c[1]-1]-a[c[0]-1]==c[2]:
            p += c[3]
        res = max(res,p)
print(res)
from functools import reduce

def gcd(m, n):
    # 入力を m, n (m ≧ n) とする。
    tmp = max(m,n)
    n = min(m,n)
    m = tmp
    # n = 0 なら、 m を出力してアルゴリズムを終了する。
    if n == 0:
        return m
    # m を n で割った余りを新たに n とし、更に 元のnを新たにm とし 2. に戻る。
    return gcd(n, m % n)

def gcda(arr, left, right):
    return reduce((lambda a,b:gcd(a,b)), arr[left:right+1], gcd(arr[left], arr[right]))

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

if n == 2:
    print(max(nums))
    exit()

allgcd = gcda(nums, 0, n-1)

found = 0
delete_kouho = -1
for i in range(1,n):
    if gcd(nums[0], nums[i]) == allgcd:
        found += 1
        delete_kouho = i

if found >= 2:
    print(gcda(nums, 1, n-1))
    exit()
else:
    print(gcd(gcda(nums, 0, delete_kouho-1), gcda(nums, delete_kouho+1, n-1)))


### FIXED CODE ###

from functools import reduce

def gcd(m, n):
    # 入力を m, n (m ≧ n) とする。
    tmp = max(m,n)
    n = min(m,n)
    m = tmp
    # n = 0 なら、 m を出力してアルゴリズムを終了する。
    if n == 0:
        return m
    # m を n で割った余りを新たに n とし、更に 元のnを新たにm とし 2. に戻る。
    return gcd(n, m % n)

def gcda(arr, left, right):
    return reduce((lambda a,b:gcd(a,b)), arr[left:right+1], gcd(arr[left], arr[right]))

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

if n == 2:
    print(max(nums))
    exit()

left_n = [0 for _ in range(n)]
right_n = [0 for _ in range(n)]

left_n[0] = nums[0]
right_n[n-1] = nums[n-1]

for i in range(n-1):
    left_n[i+1] = gcd(left_n[i], nums[i+1])
    right_n[n-2-i] = gcd(right_n[n-1-i], nums[n-2-i])

# print(left_n)
# print(right_n)

maxgcd = 0
for i in range(n):
    if i == 0:
        maxgcd = max(maxgcd, right_n[1])
    if i == n-1:
        maxgcd = max(maxgcd, left_n[n-2])
    else:
        maxgcd = max(maxgcd, gcd(right_n[i+1], left_n[i-1]))

print(maxgcd)
k = int(input())
a, b = list(map, int(input()))
B = b + 1

for i in range(a, B):
  if i % k == 0:
    print("OK")
  else:
    print("NG")

### FIXED CODE ###

k = int(input())
a, b = map(int, input().split())
 
for x in range(a, b+1):
    if x % k == 0:
        print('OK')
        break
else:
    print('NG')
n,m=map(int,input().split())
i1=[input() for _ in range(n)]
i2=[input() for _ in range(m)]
ans="No"
for i in range(n-m+1):
    for j in range(n-m+1):
        if i1[i][j:m+j]==i2[0] and i1[i+1][j:j+m]==i2[1]:
            ans="Yes"
print(ans)

### FIXED CODE ###

a,b=map(int, input().split())
if a==b:
  print("Draw")
elif a==1 or (a>b and b!=1):
  print("Alice")
else:
  print("Bob")
while True:
	n,m=map(int, raw_input().split())
	if n==0:break
#	c=sorted(map(int,raw_input().split()))[::-1]
#	if m > n:
#		print sum(c)
#	else:
#		c[m-1::m] = [0 for i in range(m-1,n,m)]
#		print sum(c)
	

### FIXED CODE ###

# try-except is necessary for avoiding Runtime Error 
while 1:
	try:
		n,m=map(int,raw_input().split())
		if n==0:break
		v=sorted(map(int,raw_input().split()))[::-1]
		for i in range(m-1,n,m):
			v[i]=0
		print sum(v)
	except:
		pass
b = input()
x = ["A", "C"]
y = ["T", "G"]
print(y[x.index(b)])

### FIXED CODE ###

b = input()

if b == "A":
  print("T")
elif b == "C":
  print("G")
elif b == "G":
  print("C")
else:
  print("A")