Harryxun/stf_run huggingface dataset:
N, Y = map(int, input().split())
 
for x in range(N+1):
  for y in range(N-x+1):
    z = N - x - y
    if 10000 * i + 5000 * j + z*1000 == Y:
      print(x,y,z)
      exit()

print(-1,-1,-1)

### FIXED CODE ###

N, Y = map(int, input().split())
 
for x in range(N+1):
  for y in range(N-x+1):
    z = N - x - y
    if 10000 * x + 5000 * y + 1000 * z == Y:
      print(x,y,z)
      exit()
print(-1,-1,-1)
from collections import defaultdict
n = int(input())
v = list(map(int,input().split()))
a = v[::2]
b = v[1::2]
def calc(l):
    d = defaultdict(int)
    for x in l:
        d[x] += 1
    return sorted([(d[x], x) for x in d],reverse=True)
A = calc(a)
B = calc(b)
al,ax = A[0]
bl,bx = B[0]
if ax != bx:
    print(n-al-bl)
else:
    ar,ay = A[1] if len(A) > 1 else 0,None
    br,by = B[1] if len(B) > 1 else 0,None
    print(min(n-al-br,n-ar-bl))

### FIXED CODE ###

from collections import defaultdict
n = int(input())
v = list(map(int,input().split()))
a = v[::2]
b = v[1::2]
def calc(l):
    d = defaultdict(int)
    for x in l:
        d[x] += 1
    return sorted([(d[x], x) for x in d],reverse=True)
A = calc(a)
B = calc(b)
al,ax = A[0]
bl,bx = B[0]
if ax != bx:
    print(n-al-bl)
else:
    ar,ay = A[1] if len(A) > 1 else (0,None)
    br,by = B[1] if len(B) > 1 else (0,None)
    print(min(n-al-br,n-ar-bl))
from __future__ import print_function
import sys


if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


def solve():
    ans = 0
    for i in range(1, n+1):
        if i % 2 == 1 and a[i-1] % 2 == 1:
            ans += 1
    print(ans)
    return




n = RN()
a = RA()
solve()


### FIXED CODE ###

from __future__ import print_function
import sys


if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


def solve():
    ans = 0
    for i in range(l, r+1):
        if i % d == 0:
            ans += 1
    print(ans)
    return





l, r, d = RA()
solve()
#include <stdio.h>
long long int pw(long long int x,long long int n){
  long long int result = 1;
  if(n > 0){
    result = pw(x,n/2);
    if(n % 2 == 0){
      result = result * result;
    }else{
      result = (result * result)*x;
	}
  }
  return result;
}

int main(){
  long long int m;
  long long int n;
  scanf("%lld %lld",&m,&n);
  printf("%lld\n",pw(m,n)%1000000007);
  return 0;
}

### FIXED CODE ###

def mpow(x,n,mod):
    if n == 0:
        return 1
    if n % 4 == 0:
        return mpow((x**4)%mod,int(n/4),mod)
    elif n%4 == 1:
        return (mpow(x,int(n-1),mod)*x)%mod
    elif n%4 == 2:
        return (mpow(x,int(n-2),mod)*(x**2))%mod
    elif n%4 == 3:
        return (mpow(x,int(n-3),mod)*(x**3))%mod
n,m = map(int,input().split())
mod = 1000000007
print(mpow(n,m,mod))
(A,B)=map(int, input().split())
 
for x in range(10000):
    if (int(x*0.08)==A and int(x*0.1)==B):
        print(x)
        break
    else:
        print('-1')

### FIXED CODE ###

S=input()
if (S[0]==S[1]==S[2]):
    print('No')
else:
    print('Yes')
import sys
n,y = map(int, input().split())

for a in range(n+1):
  for b in range(n+1-a):
    if a * 10000 + b * 5000 + (n-a-b) * 1000 == y:
      print(a)
	  sys.exit()

print('-1 -1 -1')
sys.exit()

### FIXED CODE ###

import sys

n,y = map(int, input().split())

for a in range(n+1):
	for b in range(n+1-a):
		c = n - a - b
		if (a * 10000 + b * 5000 + c * 1000 == y):
				print(str(a) + ' ' + str(b) + ' ' + str(c))
				sys.exit()
	
print('-1 -1 -1')
sys.exit()
n,m=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i]=map(int,input().split())
def merge(rr):
    mid=len(rr[0])
    c=int(mid/2)
    if mid>1:
        left=merge([rr[0][:c],rr[1][:c]])
        right=merge([rr[0][c:],rr[1][c:]])
        ar=[]
        br=[]
        while len(left[0])!=0 and len(right[0])!=0:
            if left[0][0]<right[0][0]:
                ar.append(left[0].pop(0))
                br.append(left[1].pop(0))
            else:
                ar.append(right[0].pop(0))
                br.append(right[1].pop(0))
        if len(left[0])!=0:
            ar.extend(left[0])
            br.extend(left[1])
        elif len(right[0])!=0:
            ar.extend(right[0])
            br.extend(right[1])
        rr=[ar,br]
    return rr
rr=[a,b]
re=merge(rr)
tot=0
sum=0
while(1):
    if tot+re[1][0]<=m:
        tot+=re[1][0]
        sum+=re[0][0]*re[1][0]
        re[1].pop(0)
        re[0].pop(0)
    else:
        break
sum+=re[0][0]*(m-tot)
print(sum)

### FIXED CODE ###

import numpy as np

n,m = map(int,input().split())
a=[0] * n
b=[0] * n
for i in range(n):
    a[i],b[i] = map(int,input().split())

mk = np.array([a,b])
#print(m)
index = np.argsort(mk)
#print(index)
mn = np.array([mk[0,index[0,:]],mk[1,index[0,:]]])
#print(mn)

sum = 0
for i in range(n):
    if mn[1][i] <= m:
        sum += mn[0][i] * mn[1][i]
        m = m - mn[1][i]

    else:
        sum += mn[0][i] * m
        break
print(sum)
def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		print "a < b"
	elif a == b :
		print "a == b"
	else a > b :
		print "a > b"


if __name__ = "__main__"
	solve()

### FIXED CODE ###

def solve():
	a, b = map(int, raw_input().split())
	if a < b :
		print "a < b"
	elif a == b :
		print "a == b"
	else:
		print "a > b"


if __name__ == "__main__":
	solve()
ef d_3n_numbers(N, A):
    import heapq
 
    def _heappush_max(heap, item):
        heap.append(item)
        heapq._siftdown_max(heap, 0, len(heap) - 1)
    def _heappop_max(heap):
    """Maxheap version of a heappop."""
    　　lastelt = heap.pop()    # raises appropriate IndexError if heap is empty
    　　if heap:
        　　returnitem = heap[0]
        　　heap[0] = lastelt
        　　heapq._siftup_max(heap, 0)
        　　return returnitem
    　　return lastelt
    setattr(heapq, '_heappush_max', _heappush_max)
 
    left = A[:N]
    heapq.heapify(left)
    right = A[2 * N:]
    heapq._heapify_max(right)
    left_sum, right_sum = [sum(left)], [sum(right)]
 
    # 同じ要素をleftとrightで取り合っても、相殺されるので問題ない
    for k in range(N, 2 * N):
        heapq.heappush(left, A[k])
        v = heapq.heappop(left)
        left_sum.append(left_sum[-1] + A[k] - v)
    for k in range(2 * N - 1, N - 1, -1):
        heapq._heappush_max(right, A[k])
        v = heapq._heappop_max(right)
        right_sum.append(right_sum[-1] + A[k] - v)
    right_sum = right_sum[::-1]
 
    ans_candidate = [a - b for a, b in zip(left_sum, right_sum)]
    return max(ans_candidate)
 
N = int(input())
A = [int(i) for i in input().split()]
print(d_3n_numbers(N, A))

### FIXED CODE ###

import sys,heapq
#これを加える！！！！
def _heappush_max(heap, item):
    heap.append(item)
    heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappop_max(heap):
    """Maxheap version of a heappop."""
    lastelt = heap.pop()    # raises appropriate IndexError if heap is empty
    if heap:
        returnitem = heap[0]
        heap[0] = lastelt
        heapq._siftup_max(heap, 0)
        return returnitem
    return lastelt

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

res = [0]*(n+1)
head = a[:n:]
heapq.heapify(head)
p = sum(head)
for i in range(n+1):
    res[i] = p
    p += a[n+i]
    heapq.heappush(head,a[n+i])
    p -= heapq.heappop(head)
end = a[2*n::]
heapq._heapify_max(end)
q = sum(end)
for i in range(n+1):
    res[n-i] -= q
    q += a[2*n-1-i]
    _heappush_max(end,a[2*n-1-i])
    q -= _heappop_max(end)
print(max(res))
# 初見不正解：RE (Runtime Error)
n = int(input())
a_list = list(map(int, input().split())) # list()を忘れずに

n_division = 0
is_odd = 0

def odd_detector(a_list):
    for a_i in a_list:
        if a_i % 2 == 1:
            is_odd = 1
            break
    return is_odd

while odd_detector(a_list) == 0:
    a_list = [a/2 for a in a_list]
    n_division += 1

print(n_division)

### FIXED CODE ###

print(input().count("1"))
S=input()
N=len(S)
cnt=0
cnt1=0
cnt2=0
for i in range (N):
    if S[i]==S[N-1-i]:
        cnt+=1
 
if cnt==N:
    for j in range((N-1)//2):
        if  S[j]==S[(N-1)//2 -1-j]:
            cnt1+=1
    if cnt1==(N-1)//2:
        for k in range((N-1)//2):
            if S[(N+3)//2 -1+k]==S[N-1-k]:
                cnt2+=1
    else:
        print("No")
		exit()
    if cnt2==(N-1)//2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

S=input()
N=len(S)
cnt=0
cnt1=0
cnt2=0
for i in range (N):
    if S[i]==S[N-1-i]:
        cnt+=1

if cnt==N:
    for j in range((N-1)//2):
        if  S[j]==S[(N-1)//2 -1-j]:
            cnt1+=1
    if cnt1==(N-1)//2:
        for k in range((N-1)//2):
            if S[(N+3)//2 -1+k]==S[N-1-k]:
                cnt2+=1
    else:
        print("No")
        exit()
    if cnt2==(N-1)//2:
        print("Yes")
    else:
        print("No")
else:
    print("No")
N = input()
S = list(input())

min_num = 300000
left = 0
right = S.count("E")

for i in range(len(S)):

  if i > 0:
    left += int(S[i - 1] == "W")

  right -= int(S[i + 1] == "E")

  if left + right < min_num:
    min_num = left + right

print(min_num)


### FIXED CODE ###

N = input()
S = list(input())

length = len(S)
min_num = 300000
left = 0
right = S.count("E")

for i in range(length):

  if i > 0:
    left += int(S[i - 1] == "W")

  if i < length:
    right -= int(S[i] == "E")

  if left + right < min_num:
    min_num = left + right

print(min_num)
import itertools
def list_difference(list1, list2):
    result = list1.copy()
    for value in list2:
        if value in result:
            result.remove(value)

    return len(result)


#n=int(input())
#a=[list(input()) for i in range(n)]
count=0
a=list(itertools.permutations(a))
for i in range(len(a[1])):
    if list_difference(a[i][0],a[i][1])==0:
        count+=1
print(count)

### FIXED CODE ###

import math
import collections

n=int(input())
a=[list(input()) for i in range(n)]
b=[str(sorted(list(i))) for i in a]
count=list(collections.Counter(b).values())
count=[i for i in count if i>1]
print(int(sum([math.factorial(x)/(math.factorial(x-2)*2) for x in count])))
n = int(input())
x = int(sqrt(n))
print(x**2)

### FIXED CODE ###

import math
n = int(input())
x = int(math.sqrt(n))
print(x**2)
import functools
L, R = map(int, input().split())
mod = 2019

@functools.lru_cache(maxsize = None)
for i in range(L, R) :
	for j in range(i + 1, R + 1) :
		if((i * j) % 2019 < mod) :
			mod = (i * j) % 2019
		else :
			pass
	if(mod == 0) :
		break
	else :
		pass
	
print(mod)

### FIXED CODE ###

L, R = map(int, input().split())
mod = 2019

for i in range(L, R) :
	for j in range(i + 1, R + 1) :
		if((i * j) % 2019 < mod) :
			mod = (i * j) % 2019
			x = ((i * j) // 2019) * 2019 + 2019
			if(x > i * R) :
				break
			else :
				pass
		elif(mod == 0) :
			break
		else :
			pass
	if(mod == 0) :
		break
	else :
		pass
	
print(mod)
from typing import List, Tuple
import sys
input = sys.stdin.readline


class Human:

    def __init__(self, statements: List[Tuple[int, int]]):
        self.statements = statements

    def is_honest(self, honest_list: List[int]):
        for x, y in self.statements:
            if y:
                if x not in honest_list:
                    return False
            else:
                if x in honest_list:
                    return False
        return True


class Humans:

    def __init__(self):
        self.humans = [None]

    def add(self, human: Human):
        self.humans.append(human)

    def is_all_honest(self, honest_list: List[int]):
        for i in honest_list:
            if not self.humans[i].is_honest(honest_list):
                return False
        return True


def main():
    n = int(input())
    humans = Humans()
    for _ in range(n):
        a = int(input())
        xy = [tuple(map(int, input().split())) for _ in range(a)]
        humans.add(Human(xy))
    max_honest = 0
    for bit in range(2**n):
        honest_list = []
        for i in range(n):
            if (bit >> i) & 1:
                honest_list.append(i+1)  # 1ずれるため補正
        if humans.is_all_honest(honest_list):
            max_honest = max(max_honest, len(honest_list))
    print(max_honest)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline


class Human:

    def __init__(self, statements):
        self.statements = statements

    def is_honest(self, honest_list):
        for x, y in self.statements:
            if y:
                if x not in honest_list:
                    return False
            else:
                if x in honest_list:
                    return False
        return True


class Humans:

    def __init__(self):
        self.humans = [None]

    def add(self, human: Human):
        self.humans.append(human)

    def is_all_honest(self, honest_list):
        for i in honest_list:
            if not self.humans[i].is_honest(honest_list):
                return False
        return True


def main():
    n = int(input())
    humans = Humans()
    for _ in range(n):
        a = int(input())
        xy = [tuple(map(int, input().split())) for _ in range(a)]
        humans.add(Human(xy))
    max_honest = 0
    for bit in range(2**n):
        honest_list = []
        for i in range(n):
            if (bit >> i) & 1:
                honest_list.append(i+1)  # 1ずれるため補正
        if humans.is_all_honest(honest_list):
            max_honest = max(max_honest, len(honest_list))
    print(max_honest)


if __name__ == "__main__":
    main()
n, a, b = map(int, input().split())

s = "b"*a + "r"*b
d = n//(a+b)+1
s = s*d
print(s[:n].count("b"))

### FIXED CODE ###

n, a, b = map(int, input().split())
d = n//(a+b)
e = 0
if n%(a+b) <= a:
  e += n%(a+b)
else:
  e += a
print(d*a+e)
N = int(input())
A = list(map(int, input().split()))
A.sort()

F = [0 for i in range(A[-1]+1)]
for i in A:
  F[i] = 1

c_set = set()
for i in A:
  if F[i] == 0:
    continue
  c_set.add(i)
  for j in range(i, A[-1]+1, i):
    F[j] = 0

ans = len(c_set)
d = 0
d_set = set()
for i in range(N):
  if i == 0:
    if A[i] == A[i+1]:
      d_set.add(A[i])
  elif i < N - 1 and A[i-1] != A[i] and A[i] == A[i+1]:
    d_set.add(A[i])

print( len(c_set - d_set) )

### FIXED CODE ###

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

F = [0 for i in range(A[-1]+1)]
for i in A:
  F[i] = 1

c_set = set()
for i in A:
  if F[i] == 0:
    continue
  c_set.add(i)
  for j in range(i, A[-1]+1, i):
    F[j] = 0

ans = len(c_set)
d = 0
d_set = set()
for i in range(N):
  if i == 0 and N > 1:
    if A[i] == A[i+1]:
      d_set.add(A[i])
  elif i < N - 1 and A[i-1] != A[i] and A[i] == A[i+1]:
    d_set.add(A[i])

print( len(c_set - d_set) )
a,b,c = list(map(int, input(),split()))
print(c,a,b)

### FIXED CODE ###

a,b,c = list(map(int, input().split()))
print(c,a,b)
n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n):
  for j in range(i+1,n):
    list2.append(array[i]*array[j])
a=n*(n-1)/2
ans=0
for m in range(a):
  ans=ans+list2[m]
  if ans>=10**9+7:
    ans=ans-(10**9+7)
print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans-=a[i]*a[i]
ans//=2
mod=10**9+7
ans%=mod
print(ans)
import sys

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

def euclid(a, b):
    if a == b:
        return a
    if a > b:
        return euclid(a - b, b)
    else:
        return euclid(b - a, a)

result = array[0]
for i in array[1:]:
    result = result * i / euclid(result, i)
print result


### FIXED CODE ###

import sys

def scp(a, b):
    if b > a:
        tmp_a = a
        a = b
        b = tmp_a
    while b:
        r = a % b
        a = b
        b = r
    return a
    #for i in xrange(100000, 2, -1):
    #    if a % i == b % i == 0:
    #        return a * b / i
    #return a * b

N = int(raw_input())
array = []
for i in range(N):
    array.append(int(raw_input()))

array.sort()

#if array[-1] > pow(10, 9):
#    print array[-1]
#    sys.exit(0)

result = array[0]
for i in array[1:]:
    result = result / scp(result, i) * i
print result
import sys
n = int(input())
s = input()
if s[0] == "W":
  print(0)
  sys.exit()
MOD = 10**9+7
ans = 1
cnt = 1
for i in range(2*n):
  if s[i+1] != s[i]:
    cnt += 1
  else:
    ans *= cnt
    ans %= MOD
    cnt -= 1
if cnt != 0:
  print(0)
else:
  print(ans)

### FIXED CODE ###

import sys
n = int(input())
s = input()
if s[0] == "W":
  print(0)
  sys.exit()
MOD = 10**9+7
ans = 1
cnt = 1
right = 1
for i in range(2*n-1):
  if s[i+1] == s[i]:
    right ^= 1
  if right:
    cnt += 1
  else:
    ans *= cnt
    ans %= MOD
    cnt -= 1
if cnt != 0:
  print(0)
else:
  for i in range(1, n+1):
    ans *= i
    ans %= MOD
  print(ans)
s = list(str(input()))
t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)
n = len(s)
k = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-1,N):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B and x == y):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = list(str(input()))

n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)

l = []
m = []

for i in range(N):
    l.append(s[i])
    
for i in range (M-1,n):
    m.append(s[i])
    
a = ''.join(l)
l.reverse()
A = ''.join(l)

b = ''.join(m)
m.reverse()
B = ''.join(m)

t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)

if (a==A and b==B and a == b):
    print('Yes')
else:
    print('No')
n = list(map( int, split()))

h = 3
for i range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)

print(a)

### FIXED CODE ###

n = list(map( int, input()))
 
h = 3
for i in range(h):
  if( n[i] == 1):
    n[i] = 9
    n[i] = str(n[i])   
  else:
    n[i] = 1
    n[i] = str(n[i])
    
a = "".join(n)
 
print(a)
N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
H.remove(H[0:K])
print(K+sum(H[K:]))

### FIXED CODE ###

N,K=map(int,input().split())
H=list(map(int,input().split()))
H.sort(reverse=True)
print(sum(H[K:]))
n,k = map(int,input().split())
a = list(map(int,input().split()))
import math
digit = math.floor(math.log2(k)) + 1
stand = sum(a)
ans = []
for i in range(digit):
  add = 2 ** i
  ch = 0
  for j in range(n):
    now = add ^ a[j]
    ch += now
  if ch > stand:
    ans.append(add)
ch = 0
add = sum(ans)
for j in range(n):
  now = add ^ a[j]
  ch += now
print(ch)

### FIXED CODE ###

#18:37
n,k = map(int,input().split())
a = list(map(int,input().split()))
now = 2 ** len(bin(k)[2:])
can = 0
while now:
  tmp = 0
  for i in range(n):
    if a[i] ^ now > a[i]:
      tmp += 1
  if tmp * 2 > n:
    can += now
    if can > k:
      can -= now
  now //= 2
ans = 0
for i in range(n):
  ans += a[i] ^ can
#print(can)
print(ans)
N,K=map(int,input().split())
A=list(map(int,input().split()))
m,p,z=[],[],0
for a in A:
    if a<0:
        m.append(a)
    elif a>0:
        p.append(a)
    else:
        z+=1
m.sort()
p.sort()
mod=10**9+7
from functools import reduce
if (len(p) or K%2==0) and K<len(m)+len(p) or K==len(m)+len(p) and len(m)%2==0:
    r=1
    i,j=0,0
    while i+j<K:
        if i<len(m)-1 and i+j<K-1 and m[i]*m[i+1]>p[-j-1]*p[-j-2]:
            r=r*m[i]*m[i+1]%mod
            i+=2
        else:
            r=r*p[-j-1]%mod
            j+=1
    print(r)
elif z:
    print(0)
else:
    print(reduce(lambda x,y:x*y%mod,(m+p)[-K:]))

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
m,p,z=[],[],0
for a in A:
    if a<0:
        m.append(a)
    elif a>0:
        p.append(a)
    else:
        z+=1
m.sort()
p.sort()
mod=10**9+7
from functools import reduce
if (len(p) or K%2==0) and K<len(m)+len(p) or K==len(m)+len(p) and len(m)%2==0:
    r=1
    i,j=0,0
    while i+j<K:
        if i<len(m)-1 and i+j<K-1 and (j>=len(p)-1 or m[i]*m[i+1]>p[-j-1]*p[-j-2]):
            r=r*m[i]*m[i+1]%mod
            i+=2
        else:
            r=r*p[-j-1]%mod
            j+=1
    print(r)
elif z:
    print(0)
else:
    print(reduce(lambda x,y:x*y%mod,(m+p)[-K:]))
N,M,C = list(map(int,input().split()))
import numpy as np
B = np.array(input().split() ,dtype=np.int64)
ret  =0
for i in range(N):
    if( np.sum(np.matmul(B , np.array(input().split() ,dtype=np.int64))) +C>0):
        ret += 1
print(ret)
    

### FIXED CODE ###

N,M,C = list(map(int,input().split()))
import numpy as np
B = np.array(input().split() ,dtype=np.int64)
ret =0
for i in range(N):
    if( np.sum(B * np.array(input().split() ,dtype=np.int64)) +C>0):
        ret += 1
print(ret)
import sys

q=input()
x=[int(i) for i in input().split()]
cnt=input()
j=0
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*MAX


### FIXED CODE ###


q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

dic = {}

for k in x :
    if k in dic.keys() :
        dic[k] += 1
    else :
        dic[k] = 1
    
for i in y :
    if i in dic.keys() :
        dic[i] -= 1
        if dic[i] == -1 :
            print('NO')
            exit()
    else :
        print('NO')
        exit()
print('YES')
a, b = map(int, intput().split())
import math
print(a*b//math.gcd(a,b))


### FIXED CODE ###

a = int(input())
b = int(input())

print(6-(a+b))
from sys import stdin
import fractions

a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

print(a * b // fractions.gcd(a, b))


### FIXED CODE ###


import fractions

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

print(a * b // fractions.gcd(a, b))
Y, M, D = map(int, input().split(/))
boo = False
if Y < 2019:
  boo = True
else:
  if Y == 2019 and M <= 4:
    boo = True
if boo:
  print("Heisei")
else:
  print("TBD")

### FIXED CODE ###

Y, M, D = map(int, input().split("/"))
boo = False
if Y < 2019:
  boo = True
else:
  if Y == 2019 and M <= 4:
    boo = True
if boo:
  print("Heisei")
else:
  print("TBD")
S=str(input())
if int(str[5:7])<5:
  print("Heisei")
else:
  print('TBD')

### FIXED CODE ###

S=str(input())
if int(S[5:7])<5:
  print("Heisei")
else:
  print('TBD')
N,A,B,C,D = map(int, input().split())
s = input()
index = [(n+1) for n, v in enumerate(s) if s[n:n+3] == "..."]

if "##" in s[a:]:
    print("No")

else:
    if C < D:
        print("Yes")

    if C > D:
        if len(index)>=1:
            for i in index:
                if B <= i+1 <= D:
                    print("Yes")
                    exit()
            print("No")
        else:
            print("No")


### FIXED CODE ###

N,A,B,C,D = map(int, input().split())
s = input()
index = [(n+1) for n, v in enumerate(s) if s[n:n+3] == "..."]

if C < D:
    if "##" in s[A-1:D]:
        print("No")
    else:
        print("Yes")

if C > D:
    if "##" in s[A-1:C]:
        print("No")
    else:
        if len(index)>=1:
            for i in index:
                if B <= i+1 <= D:
                    print("Yes")
                    exit()
            print("No")
        else:
            print("No")
A = 25 - int(input()) # 0,1,2,3
X = [0] * (10 ** 8 * (2**A))

### FIXED CODE ###

D = int(input())
if D == 25:
    print("Christmas")
elif D == 24:
    print("Christmas Eve")
elif D == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")
N = int(input())
sum = 0
for i in N:
  X = input().split()
  if X[1] == 'JPY':
    sum += float(X[0])
  else:
  	sum += float(X[0])*380000
print(sum)


### FIXED CODE ###

N = int(input())
sum = 0
for i in range (N):
  X = input().split()
  if X[1] == 'JPY':
    sum += float(X[0])
  else:
  	sum += float(X[0])*380000
print(sum)