Harryxun/stf_run huggingface dataset:
from copy import deepcopy

N, MA, MB = map(int, raw_input().split())
X = [map(int, raw_input().split()) for _ in range(N)]

DP = [[100000 for _ in range(401)] for _ in range(401)]
DP[0][0] = 0

S = {(0, 0)}
for a, b, c in X:
    DP2 = deepcopy(DP)
    for sa, sb in S:
        if DP[sa+a][sb+b] > DP2[sa][sb] + c:
            DP[sa+a][sb+b] = DP2[sa][sb] + c
    T = {(sa+a, sb+b) for sa, sb in S}
    S |= T

a, b = MA, MB
ans = 100000
while a <= 400 and b <= 400:
    ans = min(ans, DP[a][b])
    a += MA
    b += MB

if ans == 100000:
    print -1
else:
    print ans


### FIXED CODE ###

A, B = map(int, raw_input().split())
card = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
if card.index(A) > card.index(B):
    print "Alice"
elif card.index(A) < card.index(B):
    print "Bob"
else:
    print "Draw"
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
AGC028 B
"""

import itertools
import math

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

cut = 10**9+7


def modInverse(a, b, divmod=divmod):
    r0, r1, s0, s1 = a, b, 1, 0
    while r1 != 0:
        q, rtmp = divmod(r0, r1)
        stmp = s0-q*s1
        r0, s0 = r1, s1
        r1, s1 = rtmp, stmp
    return s0 % cut


# def factorial(n):
#     nn = 1
#     for i in range(2, n+1):
#         nn = nn*i
#     return(nn)


invlist = [modInverse(i, cut) for i in range(1, n+1)]
accuminv = list(itertools.accumulate(invlist, func=lambda x, y: x+y % cut))

ans = 0
nfact = math.factorial(n)
for i in range(n):
    sump = accuminv[i]+accuminv[n-1-i] - 1
    ans += ali[i]*sump % cut

ans = ans*nfact % cut
print(ans)




### FIXED CODE ###

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
AGC028 A
"""

import fractions

n, m = map(int, input().split())
s = input()
t = input()

g = fractions.gcd(n, m)
lcm = (n*m//g)

flag = True
for i in range(g):
    if s[i*lcm//m] != t[i*lcm//n]:
        flag = False
        break

if flag:
    print(lcm)
else:
    print(-1)
from bisect import insort
from collections import deque
from heapq import heapify, heappop, merge, heapreplace, heappush


class UnionFind:
    def __init__(self, n):
        self.table = [-1] * n

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

    def find(self, x, y):
        return self._root(x) == self._root(y)

    def union(self, x, y):
        r1 = self._root(x)
        r2 = self._root(y)
        if r1 == r2:
            return
        d1 = self.table[r1]
        d2 = self.table[r2]
        if d1 <= d2:
            self.table[r2] = r1
            if d1 == d2:
                self.table[r1] -= 1
        else:
            self.table[r1] = r2


def solve(aa, uft):
    roots = {x: [] for x, r in enumerate(uft.table) if r < 0}
    if n < (len(roots) - 1) * 2:
        return 'Impossible'
    for x, a in enumerate(aa):
        roots[uft._root(x)].append(a)
    queue = []
    for l in roots.values():
        l.sort()
        queue.append(deque(l))
    queue.sort()
    queue = deque(queue)
    ans = 0
    while len(queue) > 1:
        buf = []
        dq1 = queue.popleft()
        dq2 = queue.popleft()
        if len(dq1) == 1:
            while len(dq2) == 1 and len(queue) > 1:
                buf.append(dq2)
                dq2 = queue.popleft()
        ans += dq1.popleft() + dq2.popleft()
        insort(queue, deque(merge(dq1, dq2)))
        queue = deque(merge(queue, buf))
    return ans


n, m = map(int, input().split())
aa = list(map(int, input().split()))
uft = UnionFind(n)
for _ in range(m):
    uft.union(*map(int, input().split()))
print(solve(aa, uft))


### FIXED CODE ###

from collections import deque, defaultdict
from heapq import heapify, heappop, merge, heapreplace


class UnionFind:
    def __init__(self, n):
        self.table = [-1] * n

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

    def find(self, x, y):
        return self._root(x) == self._root(y)

    def union(self, x, y):
        r1 = self._root(x)
        r2 = self._root(y)
        if r1 == r2:
            return
        d1 = self.table[r1]
        d2 = self.table[r2]
        if d1 <= d2:
            self.table[r2] = r1
            if d1 == d2:
                self.table[r1] -= 1
        else:
            self.table[r1] = r2


def solve(aa, uft):
    roots = defaultdict(list)
    for x, a in enumerate(aa):
        roots[uft._root(x)].append(a)
    if len(roots) == 1:
        return 0
    if n < (len(roots) - 1) * 2:
        return 'Impossible'
    ans = 0
    queue = []
    for l in roots.values():
        l.sort()
        ans += l[0]
        queue.append(l[1:])
    lm = n - m - 2
    if lm > 0:
        mm = merge(*queue)
        for _ in range(lm):
            ans += next(mm)
    return ans


n, m = map(int, input().split())
aa = list(map(int, input().split()))
uft = UnionFind(n)
for _ in range(m):
    uft.union(*map(int, input().split()))
print(solve(aa, uft))
from math import gcd
N = int(input())
T = int(input())
for i in range(N-1):
    t = int(input())
    T = int(T * t / gcd(T, t))
print(int(T))

### FIXED CODE ###

import math
N = int(input())
T = int(input())
for i in range(N-1):
    t = int(input())
    T = T // math.gcd(T, t) * t
print(T)
import math
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

A,B = map(int,input().split())
GCD = math.gcd(A,B)
pf = prime_factorize(GCD)
print(len(set(pf))+1)

### FIXED CODE ###

import fractions
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

A,B = map(int,input().split())
GCD = fractions.gcd(A,B)
pf = prime_factorize(GCD)
print(len(set(pf))+1)
n=list(input())
n_list=[int(i) for i in n]
if n_list[0]!=1 and set(n_list)!=[9]:
  ans=9*(len(n_list)-1)+n_list[0]-1
  print(ans)
elif n_list[0]!=1 and set(n_list)==[9]:
  ans=len(n_list)*9
  print(ans)
elif n_list[0]+n_list[1]<=9:
  ans=(len(n_list)-1)*9
  print(ans)
else:
  ans=n_list[0]+n_list[1]-1+9*(len(n_list)-2)
  print(ans)
  
  



### FIXED CODE ###

N = input()
ans = 0

if N[1:] == "9" * (len(N) - 1):
    ans = int(N[0]) + (9 * (len(N) - 1))
else:
    ans = int(N[0]) + 9 * (len(N) - 1) - 1

print(ans)
li=map(int,input().split())
print("YES" li.sort()==[5,5,7] else "NO")

### FIXED CODE ###

li=list(map(int,input().split()))
print("YES" if sorted(li)==[5,5,7] else "NO")
K, X = map(int, input().split())
 
minus = K - 1
 
for i in Range(test):
  print(X - (K - i))

plus = minus + 1

for j in Range(plus):
  print(X + j)

### FIXED CODE ###

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

start = b-a+1
loop = (a*2) -1

for i in range(loop):
    print(start + i ,end=" ")
s=input()
t=input()

for i in range(len(s)-len(t)+1):
  flag=True
  for j in range(len(t)):
    if s[i+j]==t[j] and s[i+j]=="?":
      continue
    else:
      flag=False
  if flag:
    s=s[:i]+t+s[i+len(t):]
    s=s.replace("?","a")
print(s if flag else "UNRESTORABLE")



### FIXED CODE ###

s = input()
t = input()

if len(t)>len(s):
  print("UNRESTORABLE")
  exit()

ans = []

for i in range(len(s)-len(t)+1):
  for j in range(len(t)):
    if s[i+j] != t[j] and s[i+j]!='?':
      break
  else:
    ans.append((s[:i]+t+s[i+len(t):]).replace('?','a'))

if len(ans) == 0:
  print('UNRESTORABLE')
else:
  ans.sort()
  print(ans[0])
x,y=map(int,input().split());print(len(bin(y//x))-2)

### FIXED CODE ###

import math
def f(s):
    if len(s)%2==0: p=len(s)//2-1
    else: p=len(s)//2
    
    q=p
    while  q<len(s) and s[p]==s[q]:
        q+=1
    return q



s=input()

print(min(f(s),f(s[::-1])))
import fractions
a,b,c,d=map(int, input().split()) 

i = b//c- (a-1)//c
j = b//d- (a-1)//d

f=fractions.gcd(c,d)
f2= c * d / f
k = b//f2 - (a-1)//f2

pot = i + j - k

print(b-(a-1)-pot)

### FIXED CODE ###

s=input()
result = True

for i in range(3):
    if s[i]==s[i+1]:
        result = False
if result:
    print('Good')
else:
    print('Bad')
N = int(input())
ab = [list(map(int, input().split())) for _ in range(N)]
ab.reverse()
count = 0

for i in range(N):
    ab[i][0] += count
    if ab[i][1] == 1:
        continue
    else:
        if ab[i][0] > ab[i][1]:
            num = ab[i][1] - ab[i][0] % ab[i][1]
        elif ab[i][0] < ab[i][1]:
            num = ab[i][0] - ab[i][1] % ab[i][0] - 1
        count += num
        ab[i][0] += num

print(count)

### FIXED CODE ###

N = int(input())
A = []
B = []
ans = 0

for i in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

for i in range(N-1, -1, -1):
    a, b = (A[i] + ans), B[i]
    if a % b != 0:
        ans += b - a % b

print(ans)
import math

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

for i in range(a,b+1):
    if i % x == 0:
        num = i
        break

print((b-num)//x + 1 )

### FIXED CODE ###

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

a_ = a//x
b_ = b//x

if a%x == 0:
    print(b_ - a_ + 1)
else:
    print(b_- a_)
N,K = map(int,input().split())
h = list(map(int,input().split()))
 
def main(N,K,H):
    dp = [0]*N
    for i in range(1,N):
        L = [dp[j]+abs(H[i]-H[j]) for j in range(max(0,i-K),i)]
        dp[i] = min(L)
    print(dp[-1])
main(N,K,H)

### FIXED CODE ###

N,K = map(int,input().split())
H = [int(x) for x in input().split()]
 
def main(N,K,H):
    dp = [0]*N
    for i in range(1,N):
        L = [dp[j]+abs(H[i]-H[j]) for j in range(max(0,i-K),i)]
        dp[i] = min(L)
    print(dp[-1])
main(N,K,H)
N = int(input())
s = list(map(int,input().split()))
 
t = 1
for i in range(N):
    t = t * s[i]
 
if( t > 10**18):
    print(-1)
else:
    print(t)


### FIXED CODE ###

A,B = map(int,input().split())
print(A*B)
c1 = list(input().split())
c2 = list(input().split())
c3 = list(input().split())

print(c1[0]+c2[1]+c3[2])

### FIXED CODE ###

c = [0,0,0]
for i in range(3):
    c[i] = list(input().split())
    
print(c[0][0][0]+c[1][0][1]+c[2][0][2])
n = input()
print('Yes' if n.count(n[0]) >= 3 or n.count(n[1] >= 3 else 'No'))


### FIXED CODE ###

a,b,c,d=input()
print("Yes" if a==b==c or b==c==d else "No")
n = int(input())
a= list(map(int,input().split()))

a.sort()
dp = [1] * len(a)

def div(k):
  global dp
  if dp[k] != 0:
    for i in range(k):
      if a[k]%a[i] == 0:
        dp[k] = 0
        break
    if k < n-1:div(k+1)

div(1)
print(sum(dp))

### FIXED CODE ###

from collections import Counter
n = int(input())
a= list(map(int,input().split()))
if n == 1:
  print(1)
  exit()

a.sort()

c = Counter(a)
a = list(set(a))
dp = [0] * (10**6 +1)

for x in a:
  t = x * 2
  while t <= 10**6:
    dp[t] = 1
    t += x

ans = 0
for x in a:
  if (c[x] == 1) & (dp[x] == 0):
    ans += 1

print(ans)
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
v=[a[0]-1]
ans=1

def x(z):
    if z>1:
        return x(z-1)+z-2
    else:
        return 2
if m==1:
    v.append(n-a[0]-1)
    
else:
    for i in range(m-1):
        v.append(a[i+1]-a[i]-1)
    v.append(n-a[m-1]-1)
    
if v[1:].count(0)>=1:
    print(0)
    exit()

for i in range(m+1):
    if v[i]==1 or v[i]==0:
        pass
    else:
        ans*=x(v[i])
        if ans>=1000000007: 
            ans=ans%1000000007
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
l = [1]*(n+1)
#kubaru_dp = [1]*n
 
for i in range(m):
    a = int(input())
    l[a] = 0
 
# l = [1,1,1,0,1,1,1]
for i in range(2,n+1):
    if l[i]==0:
        continue
    l[i] = (l[i-1]+l[i-2])%(10**9+7)
else:
    print(l[-1]%(10**9+7))
a=input()
b=a*a*a
print(b)


### FIXED CODE ###

x=int(input())
print(x**3)
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverce=True)
ans = 0
if(k>=n):
  ans = 0
else:
  for i in range(k,n):
    ans += h[i]
print(ans)


### FIXED CODE ###

n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverse=True)
ans = 0
if(k>=n):
  ans = 0
else:
  for i in range(k,n):
    ans += h[i]
print(ans)
n,a,b=map(int,input().split())
mod=10**9+7
bikkuri=[0 for i in range(n+5)]
bikkuri[0]=1
gyaku=[0 for i in range(n+5)]
gyaku[0]=1
for i in range(1,n+5):
    bikkuri[i] = (i * bikkuri[i-1])%mod
gyaku[n+3]=
for i in range(n+4, -1, -1)
    gyaku[i]=pow(bikkuri[i], mod-2, mod)
def comb(a,b):
    return bikkuri[a]*gyaku[b]*gyaku[a-b]
ans=(2**n)-1-comb(n,a)-comb(n,b)
print(ans%mod)

### FIXED CODE ###

n,a,b=map(int,input().split())
mod=10**9+7
bunbo=1
bunshi=1
for i in range(1,max(a+1, b+1)):
    bunbo*=i
    bunshi*=n-i+1
    bunshi%=mod
    bunbo%=mod
    if i==a:
        comba=bunshi*(pow(bunbo,mod-2,mod))
    if i==b:
        combb=bunshi*(pow(bunbo,mod-2,mod))
print((2**n-1-comba-combb)%mod)
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

ans = 0
hands = []
for i in range(N):
    if i <= K - 1:
        # グー
        if T[i] == 'r':
            ans += P
            hands.append('p')
        # チョキ
        elif T[i] == 's':
            ans += R
            hands.append('r')
        # パー
        else:
            ans += S
            hands.append('s')
    else:
        if T[i] == 'r':
            if hands[i-K] != 'p':
                ans += P
                hands.append('p')
            else:
                if i + K - 1 < N:
                    hands.append(list(set('rsp') - set([T[i+K], hands[i-K]]))[0])
        # チョキ
        elif T[i] == 's':
            if hands[i-K] != 'r':
                ans += R
                hands.append('r')
            else:
                if i + K - 1 < N:
                    hands.append(list(set('rsp') - set([T[i+K], hands[i-K]]))[0])
        # パー
        else:
            if hands[i-K] != 's':
                ans += S
                hands.append('s')
            else:
                if i + K - 1 < N:
                    hands.append(list(set('rsp') - set([T[i+K], hands[i-K]]))[0])
print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

ans = 0
hands = []
for i in range(N):
    if i < K:
        # グー
        if T[i] == 'r':
            ans += P
            hands.append('p')
        # チョキ
        elif T[i] == 's':
            ans += R
            hands.append('r')
        # パー
        else:
            ans += S
            hands.append('s')
    else:
        if T[i] == 'r':
            if hands[i-K] != 'p':
                ans += P
                hands.append('p')
            else:
                if i + K <= N - 1:
                    hands.append('-')
                else:
                    hands.append('-')
        # チョキ
        elif T[i] == 's':
            if hands[i-K] != 'r':
                ans += R
                hands.append('r')
            else:
                if i + K <= N - 1:
                    hands.append('-')
                else:
                    hands.append('-')
        # パー
        else:
            if hands[i-K] != 's':
                ans += S
                hands.append('s')
            else:
                if i + K <= N - 1:
                    hands.append('-')
                else:
                    hands.append('-')

print(ans)
import itertools
n = int(input())
P = list(map(int, input().replace(' ', '')))
Q = list(map(int, input().replace(' ', '')))
N = [i + 1 for i in range(n)]
per = list(itertools.permutations(N))
lis = []
for oc in range(per):
    lis.append(int(''.join(map(str, list(per)))))
a = lis.index(P)
b = lis.index(Q)
print(abs(a - b))

### FIXED CODE ###

import itertools
n = int(input())
P = int(input().replace(' ', ''))
Q = int(input().replace(' ', ''))
N = [i + 1 for i in range(n)]
per = list(itertools.permutations(N))
lis = []
for oc in per:
    lis.append(int(''.join(map(str, list(oc)))))
a = lis.index(P)
b = lis.index(Q)
print(abs(a - b))
import math
a=int(input())
b=math.floor(float(a/2))
print({}.format(float((a-b)/a)))

### FIXED CODE ###

import math
a=int(input())
b=math.floor(float(a/2))
print(float((a-b)/a))
s=str(input())
y=700
x=0
while x!=2
if s[x]=o：
　　　y+=100
x+=1
break
print(y)

### FIXED CODE ###

S = input()
s = S.count('o')*100
 
print(700+s)
a, b, N = list(map(int, input().split()))

divisors_list = []
for i in range(a,b):
    divisor = N%i
    if divisor == 0:
        divisors_list.append(divisor)

print(len(divisors_list))
a, b, N = list(map(int, input().split()))

divisors_list = []
for i in range(a,b):
    divisor = N%i
    if divisor == 0:
        divisors_list.append(divisor)

print(len(divisors_list))

### FIXED CODE ###

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

divisors_list = []
for i in range(a,b+1):
    divisor = N%i
    if divisor == 0:
        divisors_list.append(divisor)

print(len(divisors_list))
n=(input() for i in range(int(input())))
m=(input() for i in range(int(input())))

l=list(set(n))

print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

### FIXED CODE ###

n=[input() for i in range(int(input()))]
m=[input() for i in range(int(input()))]

l=list(set(n))

print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
import fractions

def return_prime(aa):
    a_list = [1]
    if aa % 2 == 0:
        a_list.append(2)
    prime_list = list(range(3, aa + 1, 2))
    for d in prime_list:
        prime_list = [x for x in prime_list if (x == d or x % d != 0)]
    for p in prime_list:
        if aa % p == 0:
            a_list.append(p)
    return a_list

a, b = map(int, input().split())
a_list = return_prime(fractions.gcd(a, b))
print(len(set(a_list)))

### FIXED CODE ###

import fractions

def return_prime(aa):
    a_list = [1]
    for i in range(2, int(aa ** 0.5) + 2):
        while aa % i == 0:
            a_list.append(i)
            aa = aa // i
    if aa != 1:
        a_list.append(aa)
    return a_list

a, b = map(int, input().split())
a_list = return_prime(fractions.gcd(a, b))
print(len(set(a_list)))
n = int(input())
list = [0,0,0,0]

for i in range(n):
  judge = input()
  if judge === 'AC':
    list[0] += 1
  elif judge === 'WA':
    list[1] += 1
  elif judge === 'TLE':
    list[2] += 1
  elif judge === 'RE':
    list[3] += 1

print( 'AC x {}'.format(list[0]) )
print( 'WA x {}'.format(list[1]) )
print( 'TLE x {}'.format(list[2]) )
print( 'RE x {}'.format(list[3]) )

### FIXED CODE ###

n = int(input())
list = [0,0,0,0]

for i in range(n):
  judge = input()
  if judge == 'AC':
    list[0] += 1
  elif judge == 'WA':
    list[1] += 1
  elif judge == 'TLE':
    list[2] += 1
  elif judge == 'RE':
    list[3] += 1
    
print( 'AC x {}'.format(list[0]) )
print( 'WA x {}'.format(list[1]) )
print( 'TLE x {}'.format(list[2]) )
print( 'RE x {}'.format(list[3]) )
import sys
input = lambda:sys.stdin.readline().rstrip()


def solve(k, cnt):
    S = str(bin(k)).count("1") 
    L = k % S
    if L == 0:
        return 1
    cnt += solve(L,cnt)
    return cnt 

N = int(input())
P = input()
I = P.count("1")
Df = int(P,2)
Ans = [1]
for i in range(1, I+1):
    cnt = 1
    Ans.append(solve(i, cnt)+1)
#print(Ans)

for i in range(N-1):
    if P[i] == "1":
        tmp = Df - 2**(N-i-1)
    else:
        tmp = Df + 2**(N-i-1)    
    cur = str(bin(tmp)).count("1")    
    print(Ans[tmp%cur])
    #print(solve(tmp,cnt))

if P[N-1] == "1":
    tmp = Df - 1
else:
    tmp = Df
cur = str(bin(tmp)).count("1")
print(Ans[tmp%cur]+1)
#print(solve(N,cnt))

### FIXED CODE ###

N = int(input())
x = input()

cnt_x = x.count("1")
px10 = 0
nx10 = 0
ans = [0] * (N+1)

for i in range(1, N+1): #Nまで先に出しておく
    popcnt = format(i,"b").count("1")
    fx = i % popcnt
    ans[i] = ans[fx] + 1

for i in range(N):
    px10 += (int(x[i]) * pow(2,N-1-i, cnt_x+1)) % (cnt_x+1)#0⇒1となった場合の合計
    if cnt_x != 0 and cnt_x != 1:
        nx10 += int(x[i])*pow(2,N-1-i,cnt_x-1) % (cnt_x-1)#1⇒0となった場合の合計
#print(px10)
#print(nx10)
for i in range(N):
    if x[i] == "0":
        xi10 = (px10+pow(2,N-1-i,cnt_x+1))%(cnt_x+1)
        print(ans[xi10]+1)
    else:
        if cnt_x != 1:
            xi10 = (nx10-pow(2,N-1-i,cnt_x-1))%(cnt_x-1)
            print(ans[xi10]+1)
        else:
            print(0)
def main():
    N,K=map(int,input().split())
    h=list(map(int,input().split()))

    ans=[0]*N
    ans[1]=abs(h[1]-h[0])


    for i in range(2,N):
        ans[i] = min(abs(h[i] - h[j]) + ans[j] for j in range(max(0,i-K),i))
    print(ans[N-1])
    
main()

### FIXED CODE ###

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

dp=[0 for i in range(N)]
dp[1]=abs(H[1]-H[0])

for i in range(2,N):
    dp[i]=min(dp[i-1]+abs(H[i]-H[i-1]),dp[i-2]+abs(H[i]-H[i-2]))
print(dp[N-1])
d,t,s = map(int,input().split())

if (d − s*t <= 0):
  print('Yes')
else :
  print('No')


### FIXED CODE ###

d,t,s = map(int,input().split())
if (d - s*t <= 0):
  print('Yes')
else:
  print('No')
S = list(input()) 
if S[0] != "A":
    S.insert(0,"A")
#if S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] !="A":
if S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H":
    if len (S) == 4:
        S.insert(4,"A")
    elif S[4] != "A":
        S.insert(4,"A")    
if S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B":
    if len (S) == 6:
        S.insert(6,"A")
    elif S[6] != "A":
        S.insert(6,"A")
if S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B" and S[6] == "A" and S[7] == "R":
    if len (S) == 8:
        S.insert(8,"A")
    elif S[8] != "A":
        S.insert(8,"A")
if   S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B" and S[6] == "A" and S[7] == "R" and S[8] == "A" and len(S) ==9:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import sys
S = list(input()) 
#judge =1
if S[0] != "A":
    S.insert(0,"A")
#if S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] !="A":
if len(S) < 4:
    print("NO")
    sys.exit()
elif S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H":
    if len (S) == 4:
        S.insert(4,"A")
    elif S[4] != "A":
        S.insert(4,"A")    
else:
    print("NO")
    sys.exit()
if len(S) <6:
    print("NO")
    sys.exit()
elif S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B":
    if len (S) == 6:
        S.insert(6,"A")
    elif S[6] != "A":
        S.insert(6,"A")
else:
    print("NO")
    sys.exit()
if len(S) < 8:
    print("NO")
    sys.exit()
elif S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B" and S[6] == "A" and S[7] == "R":
    if len (S) == 8:
        S.insert(8,"A")
    elif S[8] != "A":
        S.insert(8,"A")
else:
    print("NO")
    sys.exit()
if   S[0] =="A" and S[1] == "K" and S[2] == "I" and S[3] == "H" and S[4] =="A" and S[5] =="B" and S[6] == "A" and S[7] == "R" and S[8] == "A" and len(S) ==9:
    print("YES")
else:
    print("NO")
n,k=map(int,input().split())
a=list(map(str,input().split()))
a=[0]+a

s="0"
t=1
flag1=0
flag2=0
for i in range(1,n+1):
    if a[t] not in s:
        s+=a[t]
        t=int(a[t])
    else:
        flag1=s.find(a[t])
        flag2=i
        break

if flag1==0:print(s[(k-1)%n+1])
else:
    if k<=n:print(s[k])
    else:
        s='0'+s[flag1:flag2]  #上下保持一致，左边加上0
        #print(s)
        print(s[(k-(flag1-1))%(flag2-1-flag1+1)])  #去除非循环节部分后求余











### FIXED CODE ###

def LIST():return list(map(int,input().split()))
def MAP():return map(int,input().split())

n,k=MAP()
a=LIST()
a=[0]+a
s=[0]
loca=1
begin=end=0
temp=[-1]*(2*10**5+1)
for i in range(1,n+1):
    s.append(a[loca])
    loca=a[loca]
    if k==i:
        print(s[i])
        exit()
    if temp[loca]==-1:
        temp[loca]=i
    else:
        begin=temp[loca]
        end=i-1
        break

if begin==0:print(s[(k-1)%n+1])
else:
    k=k-(begin-1)
    s=[0]+s[begin:]
    print(s[(k-1)%(end-begin+1)+1])
n=int(input())
{input():1for i in range(n)}
print(sum({input():1for i in range(n)}.values()))

### FIXED CODE ###

n=int(input())
d={input():1for i in range(n)}
print(sum(d.values()))