Harryxun/stf_run huggingface dataset:
a = int(input('a'))
b = int(input('b'))
c = int(input('c'))

if c > a+b:
    print('No')
else:
    print('Yes')


### FIXED CODE ###

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

if a[2] > a[0]+a[1]:
    print('No')
else:
    print('Yes')
a,b,n = map(int, input().split(" "))

dp=[0]*(n+1)

for x in range(n):
    dp[x+1] = max(dp[x],((a*(x+1)/b)//1)-a*(((x+1)/b)//1))

print(int(dp[n]))

### FIXED CODE ###

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

def floor(x):
    return ((a*x/b)//1) - a*((x/b)//1)

ans = floor(min(b-1,n))

print(int(ans))
N = int(input())
d = list(map(int,input().split()))
mid = N/2
if (d[mid]==d[mid-1]):
  print(0)
else:
  ans = d[mid]-d[mid-1]
  print(ans)

### FIXED CODE ###

N = int(input())
d = list(map(int,input().split()))
mid = N//2
d.sort()
if (d[mid]==d[mid-1]):
  print(0)
else:
  ans = d[mid]-d[mid-1]
  print(ans)
from collections import Counter

N, K = map(int, input().split())
*A, = map(int, input().split())
MOD = 10**9+7
ac = [0]*(N+1)

for i in range(1, N+1):
    ac[i] = (ac[i-1]+A[i-1])%K
for i in range(N+1):
    ac[i] -= i
    ac[i] %= K

c = Counter()
for i in range(K-1):
    c[ac[i]] += 1
ans = 0
for i in range(N+1):
    if i+K-1<=N:
        c[ac[i+K-1]] += 1
    ans += c[ac[i]]-1
    c[ac[i]] -= 1

print(ans)

### FIXED CODE ###

from collections import Counter

N, K = map(int, input().split())
*A, = map(int, input().split())
MOD = 10**9+7
S = [0]*(N+1)
c = Counter()
c[0] = 1
ans = 0

for i in range(N):
    S[i+1] = (S[i]+A[i]-1)%K
    if i+1-K>=0:
        c[S[i+1-K]] -= 1
    ans += c[S[i+1]]
    c[S[i+1]] += 1

print(ans)
K = int(input())
S = input()
a = ""
if len(S)<=K:
    exit(S)
else:
    for i in range(K):
        a+=S[i]
print(a,"...")

### FIXED CODE ###

K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")
n, x = map(int, input().split())
c = list(map(int, input().split()))
c = set([abs(x-c[i]) for i in range(n)])
l = min(c)
f = [l]
if l < 999999999:
    for i in range(1, l):
        if l % i == 0:
            f.append(i)
for i in range(len(f), 0, -1):
    d = True
    for item in c:
        if item % f[i-1] != 0:
            d = False
    if d:
        print(f[i-1])
        break


### FIXED CODE ###

a, b = map(int, input().split())
if (a*b)%2 == 0:
    print("No")
else:
    print("Yes")
def main():
    N, C, K = map(int, input().split())
    T = [int(input()) for _ in range(N)]
    ans = 0
    i = 0
    j = 0
    T.sort()
    if len(T) == 1:
        ans = 1
        return(ans)

    while True:
        if T[j] + K >= T[i+1]:
            i = i + 1
            if i == N-1:
                ans += 1
                return (ans)
            for h in range(C-2):
                if T[j] + K >= T[i+1]:
                    if h == C-3:
                        ans += 1
                        i += 2
                        j = i
                        if j >= N-1:
                            return(ans)
                        break
                    else:
                        i += 1
                        continue
                elif T[j] + K < T[i + 1]:
                    j = i + 1
                    i = i + 1
                    ans += 1
                    if j == N-1:
                        ans += 1
                        return(ans)
                    break

        elif T[j] + K < T[i+1]:
            ans += 1
            i += 1
            j = i
            if j == N-1:
                ans += 1
                return(ans)

print(main())


### FIXED CODE ###

def main():
    N, C, K = map(int, input().split())
    T = list(int(input()) for _ in range(N))

    T.sort()

    ans = 0
    temp = T[0]
    cnt = 1

    for i in range(1,N):
        if temp + K < T[i] or C == cnt:
            ans += 1
            temp = T[i]
            cnt = 1
        else:
            cnt += 1

    ans += 1
    return (ans)

print(main())
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

"""
1,2,3
    3,4,5,6
          6,7,8,9
                ...
のように，かぶらないものが2個ずつになるように伸ばす．
のちに1,4,7,...,Nと2,5,8,...,Nを作ればだいたいいける．
1,2,3と6,7,8,9でかぶるものがないので大きいところのあまりから適当に持ってきて両方に追加する

"""

def main():
    mod=10**9+7
    N=I()

    if N==1:
        print("Yes")
        print(2)
        print(1,1)
        print(1,1)
        exit()
    elif N==3:
        print("Yse")
        print(3)
        print(2,1,2)
        print(2,3,1)
        print(2,2,3)
        exit()
        
    now=0
    temp=0
    for i in range(N):
        now+=i
        if now==N:
            cnt=i
            break
        elif now>N:
            print("No")
            exit()
            
    k=cnt+1
    cnt-=1
    S=[[]for _ in range(k)]
    S[0]=[1,2,3]
    now=3
    for i in range(1,cnt-1):
        for j in range(4):
            S[i].append(now+j)
        now+=3
    
    for j in range(3):
        S[cnt-1].append(now+j)
    now+=3
        
    for i in range(cnt):
        for j in range(i+2,cnt):
            S[i].append(now)
            S[j].append(now)
            now+=1
            
    for j in range(2):
        for i in range(cnt):
            S[-1-j].append(j+1+i*3)
            
    S[-1].append(N)
    S[-2].append(N)
    
    print(k)
    for i in range(k):
        print(len(S[i]),(' '.join(map(str, S[i]))))
        
    
        
        
        
        
        

main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

"""
k組ある，
ある組から見て，残りの(k-1)組と被りが1つずつあるから要素数はk-1

"""

def main():
    mod=10**9+7
    N=I()

    k=0
    for i in range(N+5):
        ii=i*(i-1)
        if ii==2*N:
            k=i
            break
    if k==0:
        print("No")
        exit()
    
    ans=[[]for _ in range(k)]
    now=1#配る数字
    import itertools
    
    for ite in itertools.combinations(range(k),2):
        i=ite[0]
        j=ite[1]
        ans[i].append(now)
        ans[j].append(now)
        now+=1
        
    print("Yes")
    print(k)
    for i in range(k):
        print(len(ans[i]),' '.join(map(str, ans[i])))
        
        
            
            
            
 
        

main()
def count(num):    
    l1=[]
    for a in range (10):
        for b in range(10):
            for c in range (10):
                for d in range (10):
                    l1.append([a,b,c,d])
    l1=list(filter(lambda x: sum(x)==num,l1))
    return(len(l1))
import sys
length=len(sys.stdin.readlines())
for i in range (length):
    print(count(int(input())))

### FIXED CODE ###

def count(num):    
    l1=[]
    for a in range (10):
        for b in range(10):
            for c in range (10):
                for d in range (10):
                    l1.append([a,b,c,d])
    l1=list(filter(lambda x: sum(x)==num,l1))
    return(len(l1))

while True:
    try:
        print(count(int(input())))
    except:
        break
n=int(input())
a= list(map(int, input().split()))
li=[]
for i in range(n-1,n//2+1,-1):
    if 0!=a[i]:
        li.append(i+1)
for i in range(n//2+1,-1,-1):
    check=0
    for j in range(n//(i+1)):
        check+=(i+1)*(j+1) in li
    if check%2!=a[i]:
        li.append(i+1)
print(len(li))
print(" ".join(map(str,li)))

### FIXED CODE ###

n=int(input())
a= list(map(int, input().split()))
li=[0 for _ in range(n)]
for i in range(n-1,-1,-1):
    check=0
    for j in range(n//(i+1)):
        check^=li[(i+1)*(j+1)-1]
    if check!=a[i]:
        li[i]+=1
ans=[i+1 for i, x in enumerate(li) if x == 1]
print(len(ans))
print(" ".join(map(str,ans)))
#!/usr/bin/env python
import sys

def _ia(): return [ int(x) for x in sys.stdin.readline().strip().split() ]

n,t = _ia()
ab = []
asum = 1
imax = -1
amax = -1
bmax = -1
for i in range(n):
    _a,_b = _ia()
    ab.append((_a,_b))
    asum += _a
    if bmax<0 or (_b>=bmax and _a>ab[imax][0]):
        imax = i
        amax = _a
        bmax = _b
#
dp = [ 0 ] * (asum)
for i, _ab in enumerate(ab):
    if i==imax: continue
    a,b = _ab
    prev = dp.copy()
    for atot in range(asum):
        if atot>=a:
            dp[atot] = max(prev[atot],prev[atot-a]+b)
        else:
            dp[atot] = prev[atot]
#
if t>asum:
    print(dp[-1]+bmax)
else:
    print(max(dp[t-1]+bmax,dp[t]))


### FIXED CODE ###

#!/usr/bin/env python
import sys
from operator import itemgetter

def _ia(): return [ int(x) for x in sys.stdin.readline().strip().split() ]

n,t = _ia()
ab = []
for i in range(n): ab.append(_ia())
ab.sort(key=itemgetter(0))
#
bmax= ab[0][0]
dp = [ [0]*(t) for _ in range(n) ]
for i in range(n-1):
    a,b = ab[i]
    
    prev = dp[i]
    dnew = dp[i+1]
    for atot in range(t):
        if atot>=a: dnew[atot] = max(prev[atot],prev[atot-a]+b)
        else: dnew[atot] = prev[atot]
    #
    bmax = max(bmax,prev[-1]+b)
#
print(max(bmax,dp[-1][-1]+ab[-1][1]))
# -*- coding: utf-8 -*-
from math import factorial

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

def ncr(n, r):
    return int(factorial(n) / (factorial(r) * factorial(n - r)) % (10**9 + 7))

for i in range(1, K+1):
    print(ncr(K-1, i-1) * ncr(N-K+1, i))

### FIXED CODE ###

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

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

def ncr(n, r):
    return factorial(n) // (factorial(r) * factorial(n - r)) 

for i in range(1, K+1):
    if i <= N-K+1:
        print(ncr(K-1, i-1) * ncr(N-K+1, i) % (10**9 + 7))
    else:
        print(0)
S = input()
K = int(input())
for s in S:
    if s == "1":
        if K == 1:
            print(1)
            break
        k -= 1
        continue
    print(s)
    break

### FIXED CODE ###

S = input()
K = int(input())
for s in S:
    if s == "1":
        if K == 1:
            print(1)
            break
        K -= 1
        continue
    print(s)
    break
def f(s,t,k):
 n=len(s)
 a=max(t,int(s[0]))
z=0
 if k>n:z=0
 elif a==0:z=f(s[1:],t,k)
 elif k==1:z=a+(n-1)*9
 else:
  if k-1<=n:z+=f(s[1:],9,k)
  z+=(a-1)*f(s[1:],9,k-1)
  z+=f(s[1:],t,k-1)
 return z
print(f(input(),0,int(input())))


### FIXED CODE ###

def f(s, t, k):
 n = len(s)
 if k > n: return 0
 a = max(t, int(s[0]))
 if a == 0: return f(s[1:], t, k)
 if k == 1: return a + (n - 1) * 9
 z = 0
 if k - 1 <= n: z += f(s[1:], 9, k)
 z += (a - 1) * f(s[1:], 9, k - 1)
 z += f(s[1:], t, k - 1)
 return z

s = input()
k = int(input())
print(f(s, 0, k))
n = int(input())
total = 0

for i in range(n):
  a,b = map(int,split().input())
  if a == b:
    total += 1
    if total == 3:
      break
  else:
    total = 0
if total == 3:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = int(input())
total = 0

for i in range(n):
  a,b = map(int, input().split())
  if a == b:
    total += 1
    if total == 3:
      break
  else:
    total = 0
if total == 3:
  print('Yes')
else:
  print('No')
import math
import itertools

a,b=map(int,input().split())
X = [[int(i) for i in input().split()] for i in range(a)] 
#for i in range():
c = list(itertools.combinations(X, 2))


def get_distance(x1, y1, x2, y2):
    d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
    return d

ans = 0
for i in range(len(c)):
  C_x1 = c[i][0][0]
  C_x2 = c[i][1][0]
  C_y1 = c[i][0][1]
  C_y2 = c[i][1][1]
  d = get_distance(C_x1,C_y1,C_x2,C_y2)
  if type(d):
    ans = ans+1

print(ans)



### FIXED CODE ###

import math
import itertools

a,b=map(int,input().split())
X = [[int(i) for i in input().split()] for i in range(a)] 
#for i in range():
c = list(itertools.combinations(X, 2))


ans = 0

for i in range(len(c)):
  d = 0
  for j in range(b):
    d += (c[i][0][j]-c[i][1][j])**2
    if j == b-1:
      d = math.sqrt(d)
      if d.is_integer():
        ans = ans+1

print(ans)
A, B, K = map(int, input().split())

if (B-A+1) < 2*K:
    for i in range(A, B+1):
        print(i)
    exit()

lst = list(range(A, B+1))
x = [lst[i] for i in range(0, K)]
y = [lst[i] for i in range(-1, -K-1, -1)]

ans = list(set(x) | set(y))
ans.sort()

for i in ans:
    print(i)


### FIXED CODE ###

a, b, k = map(int, input().split())
for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(b - k + 1, a + k), b + 1):
    print(i)
from math import gcd
n = int(input())
a = list(map(int,input().split()))
def gcds(ls):
  ret = 0
  for i in ls:
    ret = gcd(ret,i)
  return ret
def flg(ls):
  if (sum(ls)-len(ls))%2:
    ret = 1
  else:
    ret = 2
  return ret
if n%2 == 0:
  if sum(a)%2:
    print("Second")
  else:
    print("First")
else:
  cnt = 0
  while flg(a)%2 == 0:
    odd = 0
    oddidx = -1
    even = 0
    for i,x in enumerate(a):
      if x%2:
        odd += 1
        oddidx = i
      else:
        even += 1
    if odd == 1 and a[oddidx] > 1:
      a[oddidx] -= 1
      g = gcds(a)
      for i in range(n):
        a[i] //= g
      cnt += 1
    else:
      break
  if (flg(a)+cnt)%2 == 1:
    print("First")
  else:
    print("Second")

### FIXED CODE ###

from fractions import gcd
n = int(input())
a = list(map(int,input().split()))
def gcds(ls):
  ret = 0
  for i in ls:
    ret = gcd(ret,i)
  return ret
def flg(ls):
  if (sum(ls)-len(ls))%2:
    ret = 1
  else:
    ret = 2
  return ret
if n%2 == 0:
  if sum(a)%2:
    print("First")
  else:
    print("Second")
else:
  cnt = 0
  while flg(a)%2 == 0:
    odd = 0
    oddidx = -1
    even = 0
    for i,x in enumerate(a):
      if x%2:
        odd += 1
        oddidx = i
      else:
        even += 1
    if odd == 1 and a[oddidx] > 1:
      a[oddidx] -= 1
      g = gcds(a)
      for i in range(n):
        a[i] //= g
      cnt += 1
    else:
      break
  if (flg(a)+cnt)%2 == 1:
    print("First")
  else:
    print("Second")
import collections
N = int(input())
mli = sorted(list(map(int,input().split())), reverse = False)
hp_min = mli[0]
index = 1
for i in range(1,N):
  if mli[index] % hp_min == 0:
    mli.pop(index)
  else:
    mli[index] = mli[index] % hp_min
    hp_min = mli[index]
    index += 1
    
#if mli[i] % hp_min != 0:
  #hp_min = mli[i] % hp_min 
print(hp_min)

### FIXED CODE ###

A,B = map(int, input().split())
if B % A == 0:
  print(A+B)
else:
  print(B-A)
n = input()
A = map(int, raw_input().split())

Q = input()
m = map(int, raw_input().split())

f = []
f[0] = 1

for i in range(n):
    j = 2000
  for j in range(2000):
    if(j + A < 2000 && f[j] == 1):
      f[j + A] == 1
    
for i in range(Q):
    if(f[m] == 1):
    print "yes"
  else:
    print "no"

### FIXED CODE ###

n = int(raw_input())
A = map(int,raw_input().split())
Q = int(raw_input())
m = map(int,raw_input().split())

def s(i, m):
  if m == 0:
    return True
  if i >= n or m > sum(A):
    return False
  r = s(i + 1, m) or s(i + 1, m - A[i])
  return r

for j in range(Q):
  if s(0, m[j]):
    print "yes"
  else:
    print "no"
n = int(input())
A = list(map(int,input().split()))

dp = [[-2]*(n+1) for i in range(n+1)]
low = [-2]*(n+1)
col = [-2]*(n+1)
m = 0
dp[A[0]][A[1]] = 0
low[A[0]] = 0
col[A[1]] = 0
base = 0

for _ in range(1,n):
    a,b,c = A[3*_-1:3*_+2]
    q = []
    if a==b==c:
        base += 1
        continue
    if a==b or b==c or c==a:
        if b==c:
            a,b,c = b,c,a
        elif c==a:
            a,b,c = a,c,b
        v = max(m,dp[c][c]+1)
        q.append((3,a,a,v))
        q.append((0,a,v))
        q.append((1,a,v))
        v1 = -2
        for i in range(1,n+1):
            if max(low[i],dp[i][a]+1)>= 0:
                dp[i][c] = max(dp[i][c],low[i],dp[i][a]+1)
                v1 = max(v1,dp[i][c])
                if dp[i][c] > low[i]:
                    q.append((0,i,dp[i][c]))
        q.append((1,c,v1))
        v2 = -2
        for i in range(1,n+1):
            if max(col[i],dp[a][i]+1)>= 0:
                dp[c][i] = max(dp[c][i],col[i],dp[a][i]+1)
                v2 = max(v2,dp[c][i])
                if dp[c][i] > col[i]:
                    q.append((1,i,dp[c][i]))
        q.append((0,c,v2))
        q.append((2,0,max(v,v1,v2)))
    
    else:
        for j in range(3):
            v = max(m,dp[c][c]+1)
            q.append((3,a,b,v))
            q.append((0,a,v))
            q.append((1,a,v))
            
            for i in range(1,n+1):
                if low[i]>= 0:
                    dp[i][c] = low[i]
        
            for i in range(1,n+1):
                if col[i]>= 0:
                    dp[c][i] = col[i]
   
            q.append((2,0,max(v,v1,v2)))

            a,b,c = b,c,a
    for l in q:
        if l[0] == 0:
            low[l[1]] = max(low[l[1]],l[2])
        elif l[0] == 1:
            col[l[1]] = max(col[l[1]],l[2])
        elif l[0] == 2:
            m = max(m,l[2])
        else:
            dp[l[1]][l[2]] = max(dp[l[1]][l[2]],l[3])
        
print(max(m,dp[A[-1]][A[-1]]+1)+base)

### FIXED CODE ###

import sys
input = sys.stdin.readline

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

dp = [[-float("INF")]*(n+1) for i in range(n+1)]
low = [-float("INF")]*(n+1)
m = 0
a,b = A[:2]
dp[a][b] = 0
dp[b][a] = 0
low[a] = 0
low[b] = 0
base = 0

for _ in range(1,n):
    a,b,c = A[3*_-1:3*_+2]
    q = []
    if a==b==c:
        base += 1
        continue
    m1 = max(m,max(dp[a][a],dp[b][b],dp[c][c])+1)
    for j in range(3):
        q.append((a,b,max(m,dp[c][c]+1)))
        for i in range(1,n+1):
            q.append((a,i,low[i]))
        if a==b:
            for i in range(1,n+1):
                q.append((c,i,dp[a][i]+1))
                m1 = max(m1,dp[a][i]+1)
        a,b,c = b,c,a
    for a,b,v in q:
        dp[a][b] = max(dp[a][b],v)
        dp[b][a] = max(dp[b][a],v)
        low[a] = max(low[a],v)  
        low[b] = max(low[b],v)      
    m = m1
print(max(m,dp[A[-1]][A[-1]]+1)+base)
import copy
N=int(input())
X=list(map(int,input().split()))
d=[0]*(max(X))

for i in range(N):
  if d[X[i]-1]>0:
    print(d[X[i]-1])
  else:
    Y=copy.copy(X)
    Y.pop(i)
    Y.sort()
    ans = Y[(N-2)//2]
    print(ans)
    d[X[i]-1] = ans


### FIXED CODE ###

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

Y=copy.copy(X)
Y.sort()
center = N//2
right = Y[center]
left = Y[center-1]
center_line = (right+left)/2

for i in range(N):
  if X[i] > center_line:
    print(left)
  else:
    print(right)
s = input()
s[5]=' '
s[13]=' '
print(s)

### FIXED CODE ###

a,b,c = input().split(",")
print(a,b,c)
while True:
    m,n = map(int,raw_input().split())
    a = list(str(m + n))
    print len(a)

### FIXED CODE ###

import sys
for i in sys.stdin: print len(list(str(sum(map(int,i.split())))))
L, R = map(int,input().split())
l = L % 2019
r = R % 2019
A = []
if R//2019 - L//2019 == 1:
    print(0)
else:
    for i in range(l,r+1):
        for j in range(i+1,r+1):
            A.append((i*j)%2019)
    print(min(A))


### FIXED CODE ###

L, R = map(int,input().split())
l = L % 2019
r = R % 2019
A = []
if R//2019 - L//2019 >= 1:
    print(0)
else:
    for i in range(l,r+1):
        for j in range(i+1,r+1):
            a = i * j
            A.append(a%2019)
    print(min(A))
a,b = map(raw_input().split(" "),int)
if a < b:
  print "a < b"
elsif print a > b:
  print "a > b"
else:
  print "a == b"

### FIXED CODE ###

a,b = map(int,raw_input().split(" "))
if a < b:
  print "a < b"
elif a > b:
  print "a > b"
else:
  print "a == b"
a,op,b=map(str,input().split())
if(op="+"):
  print(a+b)
else:
  print(a-b)

### FIXED CODE ###

a,op,b=map(str,input().split())
if(op=="+"):
  print(int(a)+int(b))
else:
  print(int(a)-int(b))
import sys
from collections import deque
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    P = [0] + list(map(int, input().split()))
    ans = 0
    for i in range(1, N + 1):
        if i == P[i]:
            P[i + 1] = P[i]
            ans += 1
    print(ans)



if __name__ == "__main__":
    main()


### FIXED CODE ###

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


def main():
    N = int(input())
    P = [0] + list(map(int, input().split()))
    same = deque()
    for i in range(1, N + 1):
        if i == P[i]: same.append(i)
    if not same:
        print(0)
        return

    ans = 0
    x = same.popleft()
    if not same:
        print(1)
        return
    while same:
        if same[0] - x == 1:
            same.popleft()
            ans += 1
            if same:
                x = same.popleft()
                if not same:
                    ans += 1
                    break
        else:
            ans += 1
            x = same.popleft()
            if not same:
                ans += 1
                break
    print(ans)


if __name__ == "__main__":
    main()
import math
a,b,c=map(int,input(),split())
a-=c
print(math.floor(a/(b+c))

### FIXED CODE ###

import math
a,b,c=map(int,input().split())
a-=c
print(math.floor(a/(b+c)))
n=int(input().split())
for i in range(n):
    a,b,c,d=map(int,input().split())
    q,w,e,r=0,0,0,0
    q,w=a*c,b*d
    e=q+w
    if c<=5 and d<=2:
        r=e*0.8
    print(r)


### FIXED CODE ###

n=int(input())
for i in range(n):
    a,b,c,d=map(int,input().split())
    q,w,e,r,g=0,0,0,0,0
    q,w=a*c,b*d
    e=q+w
    f=[]
    f.append(e)
    if c<5 and d<2:
        g=(a*5+b*2)*0.8
        f.append(g)
    if c<5 and d>=2:
        g=(a*5+b*d)*0.8
        f.append(g)
    if c>=5 and d<2:
        g=(a*c+b*2)*0.8
        f.append(g)
    if c>=5 and d>=2:
        e=e*0.8
        f.append(e)
    print(int(min(f)))
#128 b
n=int(input())
res=[]
for i in range(n):
    a,b=list(input().split())
    b=-1*int(b)
    res.append([a,b,i+1])
res=sorted(res)
for i in n:
    print(x[2])


### FIXED CODE ###

#128 b
n=int(input())
res=[]
for i in range(n):
    a,b=list(input().split())
    b=-1*int(b)
    res.append([a,b,i+1])
res=sorted(res)
for x in res:
    print(x[2])
N,=list(map(int, input().split()))
A = list(map(int, input().split()))
Q, = list(map(int, input().split()))
B = [0 for i in range(Q)]
C = [0 for i in range(Q)]
for q in range(Q):
  B[q],C[q]=list(map(int, input().split())) 
li=[0 for i in range(100000)]
for a in A:
  li[a]+=1
su=sum(A)
for q in range(Q):
  su += li[B[q]] * (C[q]-B[q])
  li[C[q]]+=li[B[q]]
  li[B[q]]=0
  print(su)  

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0] * Q
C = [0] * Q  
li=[0]*100001
for a in A:
  li[a]+=1
su=sum(A)
for q in range(Q):
  B,C=list(map(int, input().split())) 
  su += li[B] * (C-B)
  li[C]+=li[B]
  li[B]=0
  print(su)
N,M= map(int,input().split())
A = list(map(int, input().split()))
count=0
for i in range(M):
    if A.sort(reverse=True)[i]>=(sum(A)/4*M):
        count=count+1
if count==M:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n,m=map(int,input().split())
li=list(map(int,input().split()))
ans=0
q=sorted(li,reverse=True)
for i in range(m):
    if q[i]*4*m>=sum(li):
        ans+=1
if ans==m:
    print("Yes")
else:
    print("No")
n=input()
n.sort()
if n[0]==n[1] and n[2]==n[3]:
  print("Yes")
  
else:
  print("No")

### FIXED CODE ###

n=input()
k=sorted(n)
if k[0]==k[1] and k[2]==k[3] and k[1]!=k[2]:
  print("Yes")
  
else:
  print("No")
s = input().sorted
t = input().sorted
if s < t:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = list(input())
s.sort()

t = list(input())
t.sort(reverse=True)

if s < t:
	print('Yes')
else:
	print('No')
def com():
????x = raw_input()
????a = len(x)
  y = raw_input()
????b = len(y)

????k1 = [0 for i in range(b+1)]
????
????for i in range(a):
????????k2 = k1 + [ ]
????????for j in range(b):
????    if x[i] == y[j]:
?????????????? k1[j+1] = k2[j] + 1
      elif k1[j+1] < k1[j]:
????????????????k1[j+1] = k1[j]
  
  return k1[-1]

n = input()
for l in range(n):
????print com()

### FIXED CODE ###

def common():
  X = raw_input()
  Y = raw_input()
  a = len(X)
  b = len(Y)
  k1 = [0 for i in range(b+1)]
 
  for i in range(a):
     k2 = k1 + []
     for j in range(b):
       if X[i] == Y[j]:
          k1[j+1] = k2[j] + 1
       elif k1[j+1] < k1[j]:
          k1[j+1] = k1[j]
 
  return k1[-1]
 
n = input()
for l in range(n):
  print common()
X = int(input())
	if X in [7, 5, 3]:
    	print('YES')
	else:
		print('NO')

### FIXED CODE ###

X = int(input())
if X == 7:
  print('YES')
elif X == 5:
  print('YES')
elif X == 3:
  print('YES')
else:
  print('NO')
a = list(int(input()))
a.append(int(input()))

for i in range(1,4):
    if not(i in a):
        print(i) 

### FIXED CODE ###

a = []
a.append(int(input()))
a.append(int(input()))

for i in range(1,4):
    if not(i in a):
        print(i)