Harryxun/stf_run huggingface dataset:
from math import ceil, floor

h, n = map(int, input().split())
l = []
for _ in range(n):
  l.append(list(map(int, input().split())))

if n == 1:
  print(ceil(hp/l[0][0]) * l[0][1])
  exit(0)

dp = [
  [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)],
  [None] * (h + 1)
  ]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[1][hp] = min([dp[0][hp], dp[1][hp - l[i][0]] + l[i][1]])
    else:
      dp[1][hp] = min([dp[0][hp], l[i][1]])

  dp[0] = dp[1]
  dp[1] = [None] * (h + 1)

print(dp[0][-1])


### FIXED CODE ###

from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])
import sys
input = sys.stdin.readline
from collections import deque

h, w = map(int, input().split())
ch, cw = map(int, input().split())
gh, gw = map(int, input().split())

s = []
for i in range(h):
   s.append(input().rstrip('\n'))

INF = 10 ** 10
d = [INF] * (h*w)

A = 10**18
B = 10**9

nex = []
for i in range(-2, 3):
    for j in range(-2, 3):
        if (i, j) in [(-1,0),(1,0),(0,-1),(0,1),(0,0)]:
            continue
        else:
            nex.append((i,j))

d[(ch-1) * w + (cw-1)] = 0

T = ((-1,0), (1,0), (0,1), (0,-1))

q = [(ch-1)*A + (cw-1)*B + 0]
use = [0] * (h * w)

for x in q:
    curh = (x // A)
    x -= curh * A
    curw = (x // B)
    cnt = x - curw * B
    tmp = curh * w + curw
    if d[tmp] < cnt or use[tmp]: continue
    d[tmp] = cnt
    use[tmp] = 1

    for dh, dw in T:
        nh = curh + dh
        nw = curw + dw
        if nh >= 0 and nh < h and nw >= 0 and nw < w and s[nh][nw] == '.' and d[nh * w + nw] > cnt:
            d[nh * w + nw] = cnt
            use[nh * w + nw] = 0
            q.append(nh*A + nw*B + cnt)
    for dh, dw in nex:
        nh = curh + dh
        nw = curw + dw
        if nh >= 0 and nh < h and nw >= 0 and nw < w and s[nh][nw] == '.' and d[nh * w + nw] > cnt:
            d[nh * w + nw] = cnt + 1
            use[nh * w + nw]
            q.append(nh*A + nw*B + cnt+1)

# for item in d:
#     print(item)
gh -= 1
gw -= 1

if d[gh*w + gw] == INF:
    print(-1)
else:
    print(d[gh*w + gw])


### FIXED CODE ###

def A():
    n, x, t = map(int, input().split())
    print(t * ((n+x-1)//x))

def B():
    n = list(input())
    s = 0
    for e in n:
        s += int(e)
    print("Yes" if s % 9 == 0 else "No")

def C():
    int(input())
    a = list(map(int, input().split()))
    l = 0
    ans = 0
    for e in a:
        if e < l: ans += l - e
        l = max(l, e)
    print(ans)

def E():
    h, w, m = map(int, input().split())
    row = [0] * h
    col = [0] * w
    exist = set([])
    th = 1000000000
    for i in range(m):
        x, y = map(int, input().split())
        x -= 1
        y -= 1
        row[x] += 1
        col[y] += 1
        exist.add(x*th + y)

    max_row = max(row)
    max_col = max(col)
    candi_row = []
    candi_col = []
    for i in range(h):
        if row[i] == max_row: candi_row.append(i)
    for i in range(w):
        if col[i] == max_col: candi_col.append(i)

    ans = max_row + max_col
    for x in candi_row:
        for y in candi_col:
            if x*th + y in exist: continue
            print(ans)
            return
    print(ans - 1)

E()
n = int(input())
cards = []
for i in range(n):
	s,r=input().split()
	cards.append((s,int(r)))
for s,r in [(s,r) for s in 'SHCD' for r in range(1,14) if not in cards]:
	print(s,r)
	

### FIXED CODE ###

n = int(input())
cards = []
for i in range(n):
	s,r=input().split()
	cards.append((s,int(r)))
for s,r in [(s,r) for s in 'SHCD' for r in range(1,14) if (s,r) not in cards]:
	print(s,r)
import sys

sys.setrecursionlimit(10 ** 5 + 10)


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


def resolve():
    def make_divisors(n):
        divisors = []
        divisors2 = []
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                divisors.append(i)
                divisors2.append(n // i)
                if i != n // i:  # 平方数の場合n**0.5を1つだけにしてる
                    divisors.append(n // i)
                    divisors2.append(i)

        # divisors.sort() # ソートしたけりゃして
        return [divisors, divisors2]

    def main():
        X = int(input())

        d, d2 = make_divisors(X)[0], make_divisors(X)[1]
        i = 0
        while True:
            b = 0
            if i >= len(d):
                break
            while True:
                a = d[i] + b
                val = a ** 4 + a ** 3 * b + a ** 2 * b ** 2 + a * b ** 3 + b ** 4
                if val == d2[i]:
                    return [a, b]
                if val > d2[i]:
                    i += 1
                    b=0
                    if i >= len(d):
                        break
                else:
                    b += 1
        i = 0
        while True:
            b = -1
            if i >= len(d):
                break
            while True:
                a = d[i] + b
                val = a ** 4 + a ** 3 * b + a ** 2 * b ** 2 + a * b ** 3 + b ** 4
                if val == d2[i]:
                    return [a, b]
                if val > d2[i]:
                    i += 1
                    b=-1
                    if i >= len(d):
                        break
                else:
                    b -= 1

    print(*main())


resolve()

### FIXED CODE ###

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

def resolve():

    def main():
        X=int(input())
        for a in range(-200,200):
            for b in range(-200,200):
                if pow(a,5)-pow(b,5)==X:
                    return [a,b]
    print(*main())

resolve()
n,m = map(int, raw_input().split())
rl = [0.0 for _ in range(n)]
wl = [1.0 for _ in range(n)]
rl[0] = 1.0
wl[0] = 0.0
for _ in range(m):
    x,y = map(int, raw_input().split())
    p = rl[x-1] + wl[x-1]
    rl[y-1] += rl[x-1] / p
    wl[y-1] += wl[x-1] / p
    rl[x-1] -= rl[x-1] / p
    wl[x-1] -= wl[x-1] / p
cnt = 0
for p in rl:
    if p != 0:
        cnt += 1
print cnt


### FIXED CODE ###

a,b = map(int, raw_input().split())
if a <= 0 and b >= 0:
    print 'Zero'
elif a < 0 and b < 0 and (b-a) % 2 == 0:
    print 'Negative'
else:
    print 'Positive'
# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_c

import sys
# sys.setrecursionlimit(100000)
import heapq


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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n = input_int()
    A = input_int_list()
    B = input_int_list()

    if sum(A) < sum(B):
        print(-1)
        return
    plus = []
    minus = []

    # a < b はすべて調整の必要あり
    # a < b の補填は それぞれの b > a のうち b-a が大きいところから貪欲に補填する
    for i in range(n):
        d = B[i] - A[i]
        if d > 0:
            minus.append(d)
        else:
            heapq.heappush(plus, d)

    ans = 0
    charge = 0
    for d in minus:
        while d > 0:
            if charge == 0:
                charge = -heapq.heappop(plus)
                ans += 1
            if d <= charge:
                charge -= d
                d = 0
            else:
                charge = 0
                d -= charge

    print(len(minus) + ans)
    return


if __name__ == "__main__":
    main()


### FIXED CODE ###

# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_c

import sys
# sys.setrecursionlimit(100000)
import heapq


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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    n = input_int()
    A = input_int_list()
    B = input_int_list()
    plus = []
    minus = 0
    cnt = 0

    # a < b はすべて調整の必要あり
    # a < b の補填は それぞれの b > a のうち b-a が大きいところから貪欲に補填する
    for i in range(n):
        d = B[i] - A[i]
        if d > 0:
            minus += d
            cnt += 1
        else:
            heapq.heappush(plus, d)

    while minus > 0 and plus:
        minus -= -heapq.heappop(plus)
        cnt += 1

    if minus <= 0:
        print(cnt)
    else:
        print(-1)
    return


if __name__ == "__main__":
    main()
A = int(input())
B = int(input())
print(B*2-A))


### FIXED CODE ###

A = int(input())
B = int(input())
print(B*2-A)
n =int(input())
W=[]
w=''
for i in range(n):
    if i !=0 and w[-1] !=str(input())[0]:
        print('No')
        exit()
    else:
        w=str(input())
        W.append(w)
if len(W) != len(list(set(W))):
    print('No')
    exit()
print('Yes')

### FIXED CODE ###

n =int(input())
W=[]
w=''
for i in range(n):
    s=str(input())
    if i !=0 and w[-1] != s[0]:
        print('No')
        exit()
    else:
        w=s
        W.append(w)
if len(W) != len(list(set(W))):
    print('No')
    exit()
print('Yes')
import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,List[A-1])
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = A + i - num2
    ans  = int(ans + math.factorial(n) / (math.factorial(n - kosuu) * math.factorial(kosuu)))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)

### FIXED CODE ###

import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,mini)
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = A + i - num2
    ans  = int(ans + comb(n, kosuu, exact=True))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)
n = input()
a = list(map(int, input().split()))
colored = [0,0,0,0,0,0,0,0]
god = 0
for i in a:
  if i >= 3200:
    god += 1
  else:
    colored[i // 400] += 1
color = 8 - colored.count(0)
if color == 0:
  print(1,god)
else:
  print(color, color+god)

### FIXED CODE ###

a,b,c = input().split()
d = int(a+b+c)
print("YES") if d % 4 == 0 else print("NO")
from sys import stdin

n = int(stdin.readline().rstrip())
v = [int(i) for i in stdin.readline().rstrip().split()]

left = [0] * 10**5
right = [0] * 10**5

for i in range(len(v)):
    if i % 2 == 0:
        left[v[i]] += 1
    else:
        right[v[i]] += 1

left_max = 0
left_max_second = 0
right_max = 0
right_max_second = 0
left_flag = 0
right_flag = 0
for i in range(len(left)):
    if left_max < left[i]:
        left_max_second = left_max
        left_max = left[i]
        left_flag = i

    if right_max < right[i]:
        right_max_second = right_max
        right_max = right[i]
        right_flag = i

if left_flag == right_flag:
    tmp = min(left_max + right_max_second, right_max + left_max_second)
    # print(left_max, left_max_second, right_max, right_max_second)
    print(n - tmp)
else:
    print((n // 2 - left_max) + (n // 2 - right_max))


### FIXED CODE ###

from collections import Counter
from sys import stdin

n = int(stdin.readline().rstrip())
a = [int(i) for i in stdin.readline().rstrip().split()]

even = []
odd = []
for i in range(n):
    if i % 2 == 0:
        even.append(a[i])
    else:
        odd.append(a[i])

even_conter = Counter(even)
odd_conter = Counter(odd)

even_sorted = even_conter.most_common()
odd_sorted = odd_conter.most_common()

even_key1 = even_sorted[0][0]
even_val1 = even_sorted[0][1]
odd_key1 = odd_sorted[0][0]
odd_val1 = odd_sorted[0][1]

ans = n
if even_key1 == odd_key1:
    if len(even_sorted) >= 2:
        even_val2 = even_sorted[1][1]
        odd_val2 = odd_sorted[1][1]
        ans -= max((even_val1 + odd_val2), (odd_val1 + even_val2))
    else:
        ans -= max(even_val1, odd_val1)
else:
    ans -= (even_val1 + odd_val1)

print(ans)
N, X, T = map(int,input().split())

if ( N % x )== 0:
    print(( N // X ) * T )
else:
    print(( N // X + 1 ) * T )

### FIXED CODE ###

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

A = N % X

if ( A ) == 0:
    print(( N // X ) * T )
elif ( N % X ) != 0:
    print(( N // X + 1 ) * T )
import sys
import math


def validate(r):
    return int(r)


def main(args):
    r = validate(args[1])
    print(r**2)


if __name__ == '__main__':
    main(sys.argv)


### FIXED CODE ###

import sys


def main():
    r = int(input())
    print(r**2)


if __name__ == '__main__':
    main()
import sys
import os
import math

N, H  = map(int,input().split())
katana = [0 for _ in range(N)]

for i in range(N):
    a,b = map(int,input().split())
    katana[i] = [a,b]
katana = sorted(katana,key=itemgetter(1),reverse=True)
maxA = 0
for i in range(N):
    maxA = max(maxA,katana[i][0])

cnt = 0
for k in katana:
    if H <= 0:
        print(cnt)
        sys.exit()
    if k[1] > maxA:
        H -= k[1]
        cnt += 1
cnt += math.ceil(H/maxA)
print(cnt)


### FIXED CODE ###

import sys
import os
import math
from operator import itemgetter
 
N, H  = map(int,input().split())
katana = [0 for _ in range(N)]
 
for i in range(N):
    a,b = map(int,input().split())
    katana[i] = [a,b]
katana = sorted(katana,key=itemgetter(1),reverse=True)
maxA = 0
for i in range(N):
    maxA = max(maxA,katana[i][0])
 
cnt = 0
for k in katana:
    if H <= 0:
        print(cnt)
        sys.exit()
    if k[1] > maxA:
        H -= k[1]
        cnt += 1
cnt += math.ceil(H/maxA)
print(cnt)
n = int(input())
#a = [list(map(int, input().split())) + [i] for i in range(n)]
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
a = []
b = []
c = []
for i in range(n):
    a.append([])
    b.append([])
    c.append([])
for i in range(n):
    a[i].append(A[i])
    a[i].append(2)
    b[i].append(B[i])
    b[i].append(1)
    c[i].append(C[i])
    c[i].append(0)
d = a + b + c
d.sort(key=lambda x:(x[0], x[1]))
lenli = []
allli = []
count = 0
for i in range(len(d)):
    if d[i][1] == 2:#a
        if lenli == []:
            lenli.append(1)
        else:
            lenli[-1] += 1
    elif d[i][1] == 1:#b
        if allli == []:
            allli.append(lenli[-1])
        else:
            allli[-1] += lenli[-1]
        allli.append(allli[-1])
        lenli.append(lenli[-1])
    elif d[i][1] == 0:#c
        if i != 0 and d[i - 1][1] == 1 and allli != []:
            count += allli[-2]
        elif allli == []:
            count += 0
        else:
            count += allli[-2]

print(count)

### FIXED CODE ###

n = int(input())
#a = [list(map(int, input().split())) + [i] for i in range(n)]
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
a = []
b = []
c = []
for i in range(n):
    a.append([])
    b.append([])
    c.append([])
for i in range(n):
    a[i].append(A[i])
    a[i].append(2)
    b[i].append(B[i])
    b[i].append(1)
    c[i].append(C[i])
    c[i].append(0)
d = a + b + c
d.sort(key=lambda x:(x[0], x[1]))
lenli = []
allli = []
count = 0
for i in range(len(d)):
    if d[i][1] == 2:#a
        if lenli == []:
            lenli.append(1)
        else:
            lenli[-1] += 1
    elif d[i][1] == 1:#b
        if allli == [] and lenli != []:
            allli.append(lenli[-1])
            allli.append(allli[-1])
            lenli.append(lenli[-1])
        elif allli == [] and lenli == []:
            pass
        else:
            allli[-1] += lenli[-1]
            allli.append(allli[-1])
            lenli.append(lenli[-1])
    elif d[i][1] == 0:#c
        if allli == []:
            count += 0
        else:
            count += allli[-2]

print(count)
N = int(input())
S = list(map(int, input().split()))

cnt=0
for i in range(N):
    if S[i]=='Y':
        print('Four')
        break
        cnt=0
    else:
        cnt+=1
if cnt==N:
    print('Three')

### FIXED CODE ###

N = int(input())
S = list(map(str, input().split()))

cnt=0
for i in range(N):
    if S[i]=='Y':
        print('Four')
        break
        cnt=0
    else:
        cnt+=1
if cnt==N:
    print('Three')
n, m = map(int, input().split())
s100 = 100*(n - m) * 2**m
s1900 = m * 1900 * 2**m
print(s100 + s1900)
\

### FIXED CODE ###

n, m = map(int, input().split())
s100 = 100*(n - m) * 2**m
s1900 = m * 1900 * 2**m
print(s100 + s1900)
from typing import Union, List
import sys
from copy import copy

sys.setrecursionlimit(10**5)

# 木の根を返す
def find(x: int, S: List[int]) -> int:
    if S[x] == x:
        return x
    else:
        S[x] = find(S[x], S)
        return S[x]

# xとyが同じ集合に属すかの判定
def same(x: int, y: int, S: List[int]) -> bool:
    return find(x, S) == find(y, S)

# xとyの属する集合を結合
def unite(x: int, y: int, S: List[int]) -> None:
    rx = find(x, S)
    ry = find(y, S)
    if rx == ry:
        return None
    else:
        S[rx] = ry

if __name__ == '__main__':
    [N, M] = [int(i) for i in input().split()]

    S = [int(i) for i in range(N+1)]
    p = [0] + [int(num) for num in input().split()]

    for i in range(M):
        [x, y] = [int(i) for i in input().split()]
        unite(x, y, S)

    score = 0
    for i in range(1, N+1):
        if same(i, p[i], S):
            score += 1
    print(score)


### FIXED CODE ###

import sys
from copy import copy

sys.setrecursionlimit(10**5)

# 木の根を返す
def find(x, S):
    if S[x] == x:
        return x
    else:
        S[x] = find(S[x], S)
        return S[x]

# xとyが同じ集合に属すかの判定
def same(x, y, S):
    return find(x, S) == find(y, S)

# xとyの属する集合を結合
def unite(x, y, S):
    rx = find(x, S)
    ry = find(y, S)
    if rx == ry:
        return None
    else:
        S[rx] = ry

if __name__ == '__main__':
    [N, M] = [int(i) for i in input().split()]

    S = [int(i) for i in range(N+1)]
    p = [0] + [int(num) for num in input().split()]

    for i in range(M):
        [x, y] = [int(i) for i in input().split()]
        unite(x, y, S)

    score = 0
    for i in range(1, N+1):
        if same(i, p[i], S):
            score += 1
    print(score)
import sys
h,w=map(int,input().split())
dr=[input() for _ in range(h)]
frag='Yes'

for j in range(w-1):
  if dr[0][j]=='#':
    if dr[0][j+1]!='#' and dr[1][j]!='#' and dr[0][j-1]!='#':
      print('No')
      sys.exit()
if dr[0][w-1]=='#':
  if dr[1][w-1]!='#' and dr[0][w-2]!='#':
    print('No')
    sys.exit()
for i in range(h-2):
  for i in range(w-1):
    if dr[i][j]=='#':
      if dr[i][j+1]!='#' and dr[i+1][j]!='#' and dr[i-1][j]!='#' and dr[i][j-1]!='#':
        print('No')
        sys.exit()
  if dr[i][w-1]=='#':
    if dr[i+1][w-1]!='#' and dr[i-1][w-1]!='#' and dr[i][w-2]!='#':
      print('N0')
      sys.exit()
for j in range(w-1):
  if dr[h-1][j]=='#':
    if dr[h-1][j+1]!='#' and dr[h-1][j-1]!='#' and dr[h-2][j]!='#':
      print('No')
      sys.exit()
if dr[h-1][w-1]=='#':
  if dr[h-1][w-2]!='#' and dr[h-2][w-1]!='#':
    print('N0')
    sys.exit()
print('Yes')

### FIXED CODE ###

h,w=map(int,input().split())
a=['.'*(w+2)]+['.'+input()+'.' for _ in range(h)]+['.'*(w+2)]
for i in range(h):
  for j in range(w):
    if a[i][j]=='#':
      if not(a[i+1][j]=='#' or a[i-1][j]=='#' or a[i][j+1]=='#' or a[i][j-1]=='#'):
        print('No')
        exit()
print('Yes')
#C - Skip
N, X = map(int, input().split())
x_list = list(map(int, input().split()))

residual = [abs(x - X) for x in x_list]

def gcd(a,b):
    if(b==0):
        return a
    else:
        gcd(b, a%b)
        
max_ = 0
for i in range(len(residual)):
    if(i == 0):
        max_ = gcd(residual[i], residual[i+1])
    elif(i == N-1):
        print(max_)
    else:
        max_ = gcd(residual[i], max_)

### FIXED CODE ###

#C - Skip
import sys

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

residual = [abs(x - X) for x in x_list]

def gcd(a,b):
    if(b==0):
        return a
    else:
        return gcd(b, a%b)
        
max_ = 0
for i in range(len(residual)):
    if(N==1):
        print(residual[0])
        break
    
    if(i == 0):
        max_ = gcd(residual[i], residual[i+1])
    elif(i == N-1):
        print(max_)
    else:
        max_ = gcd(residual[i], max_)
from itertools import product

H, W, K = map(int, input().split())

C = [list(input()) for _ in range(H)]

ans = 0

for row_bit in product(range(2), repeat = H):
    for col_bit in product(range(2), repeat = W):
        cnt = 0
        for row in range(H):
            for col in range(W):
                if C[row][col] == '#' and (row_bit[row] and col_bit[col]):
                    cnt += 1
            if cnt = K:
                ans += 1
print(ans)

### FIXED CODE ###

from itertools import product

h, w, k = map(int, input().split())
c = [list(input()) for _ in range(h)]

ans = 0

for row_bit in product(range(2), repeat=h):
    for col_bit in product(range(2), repeat=w):
        cnt = 0
        for row in range(h):
            for col in range(w):
                if c[row][col] == "#" and (row_bit[row] and col_bit[col]):
                    cnt += 1
        if cnt == k:
            ans += 1

print(ans)
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp[i]=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp[n-1]))


### FIXED CODE ###

n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))
a, b = int(input())

if a > b;
    print('a > b')

if a < b;
    print('a < b')

if a == b;
    print('a == b')



### FIXED CODE ###

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

if a > b:
    print('a > b')
elif a < b:
    print('a < b')
else:
    print('a == b')
data = [int(input()) for i in range(6)]
print('Yay!' if data[-2] - data[0] =< data[-1] else ':(')

### FIXED CODE ###

data = [int(input()) for i in range(6)]
print('Yay!' if data[-2] - data[0] <= data[-1] else ':(')
import re
import numpy as np

N, X = [int(i) for i in re.split(" ", input())]
Ls = [int(i) for i in re.split(" ", input())]
Ds = np.cumsum(Ls)
counts = np.sum(Ls <= X) + 1
print(counts)

### FIXED CODE ###

import re
import numpy as np
 
N, X = [int(i) for i in re.split(" ", input())]
Ls = [int(i) for i in re.split(" ", input())]
Ds = np.cumsum(Ls)
counts = np.sum(Ds <= X) + 1
print(counts)
import numpy as np

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

As = sorted(list(map(int,input().split())))
BCs = []

for i in range(M):
	inputs = list(map(int,input().split()))
	BCs.append(inputs)
BCs = sorted(BCs, reverse = True, key=lambda x: x[1])

index = 0
for bc in BCs:
	b = bc[0]
	c = bc[1]

	for n in range(b):
		if As[index] < c:
			As[index] = c
			index += 1
print(sum(As))


### FIXED CODE ###

import numpy as np

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

As = sorted(list(map(int,input().split())))
BCs = []

for i in range(M):
	inputs = list(map(int,input().split()))
	BCs.append(inputs)
BCs = sorted(BCs, reverse = True, key=lambda x: x[1])

index = 0
for bc in BCs:
	b = bc[0]
	c = bc[1]

	for n in range(b):
		try:
			if As[index] < c:
				As[index] = c
				index += 1
			else:
				break
		except:
			break
print(sum(As))
H = int(input())

    ans = 0
    t = 1
    while H > 0:
        ans += t
        H //= 2
        t *= 2
    print(ans)

### FIXED CODE ###

H = int(input())

ans = 0
t = 1
while H > 0:
    ans += t
    H //= 2
    t *= 2
print(ans)
a,b=map(int(), input().split())
if a==b:
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

a, b=map(int, input().split())
if a==b:
  print("Yes")
else:
  print("No")