Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03804 (python)

Fixed submission:
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]

si, sj = 0, 0
c = 0
while si <= n - m:
    ni, nj = si, sj
    rest = m ** 2
    for i in range(m):
        nj = sj
        for j in range(m):
            # print(ni, nj, i, j)
            if a[ni][nj] != b[i][j]:
                break
            nj +=1
            rest -= 1
        ni += 1
        # print()
    if rest == 0:
        print("Yes")
        exit()
    sj += 1
    if sj > n - m:
        si += 1
        sj = 0

print("No")

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]

si, sj = 0, 0


while si < m:
    ni, nj = si, sj
    rest = m ** 2
    for i in range(m):
        nj = sj
        for j in range(m):
            # print(ni, nj, i, j)
            if a[ni][nj] != b[i][j]:
                break
            nj +=1
            rest -= 1
        ni += 1
    if rest == 0:
        print("Yes")
        exit()
    sj += 1
    if sj > n - m:
        si += 1
        sj = 0

print("No")

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [list(input()) for _ in range(n)]
b = [list(input()) for _ in range(m)]

for nj in range(0, n - m):
    for ni in range(0, n - m):
        for i in range(m):
            for j in range(m):
                if a[nj][ni] == b[m-1][m-1]:
                    print("Yes")
                    exit()
                if a[nj][ni] != b[j][i]:
                    break
                nj += 1
            ni += 1

print("No")
Problem p03834 (python)

Fixed submission:
s = input()

print(s.replace(",", " "))

Buggy submission (verdict: Runtime Error):
K, S = map(int, input().split())


ans = 0
for x in range(K+1):
    for y in range(K+1):
       z = S - x - y
       if z >= 0 and z <= K:
           ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
K, S = map(int, input().split())

ans = 0
for i in range(K+1):
    for j in range(K+1):
        for l in range(K+1):
            if i + j + l == S:
                ans += 1


print(ans)
Problem p02596 (python)

Fixed submission:
k = int(input())
ans = 0
if k % 7 == 0:
    L = int((9 * k) / 7)
else:
    L = 9 * k
if L % 2 == 0 or L % 5 == 0:
    print(-1)
else:
    a = 1 % L
    for i in range(L):
        if (a * 10) % L == 1:
            ans = i + 1
            print(ans)
            break
        a = (a * 10) % L
    if ans == 0:
        print(-1)

Buggy submission (verdict: Runtime Error):
k = int(input())
ans = 0
if k % 7 == 0:
    L = (9 * k) / 7
else:
    L = 9 * k
if L % 2 == 0 or L % 5 == 0:
    print(-1)
else:
    a = 1 % L
    for i in range(L):
        if (a * 10) % L == 1:
            ans = i + 1
            print(ans)
            break
        a = (a * 10) % L

Buggy submission (verdict: Runtime Error):
k = int(input())
ans = 0
if k % 7 == 0:
    L = (9 * k) / 7
else:
    L = 9 * k
if L % 2 == 0 or L % 5 == 0:
    print(-1)
else:
    a = 1 % L
    for i in range(L):
        if (a * 10) % L == 1:
            ans = i + 1
            print(ans)
            break
        a = (a * 10) % L
    if ans == 0:
        print(-1)
Problem p02623 (python)

Fixed submission:
n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a = [0]
b = [0]
for i in range(n):
    a.append(a[i] + A[i])
for i in range(m):
    b.append(b[i] + B[i])
ans = 0
j = m
for i in range(n + 1):
    if a[i] > k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a = [0]
b = [0]
for i in range(n):
    a.append(a[i] + A[i])
for i in range(m):
    b.append(b[i] + B[i])
ans = 0
j = m
for i in range(n + 1):
    if a[0] > k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = 0
cnt = 0
for i in range(n + m):
    if a[0] <= b[0]:
        t += a[0]
        del a[0]
    else:
        t += b[0]
        del b[0]
    if t >= k:
        break
    else:
        cnt += 1
print(cnt)
Problem p02629 (python)

Fixed submission:
n = int(input())
x = "abcdefghijklmnopqrstuvwxyz"
a = n
s = ""
while a != 0:
    if a % 26 == 0:
        s += x[a % 26 - 1]
        a = a//26 - 1
    else:
        s += x[a % 26 - 1]
        a = a//26
print(s[::-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
x = "abcdefghijklmnopqrstuvwxyz"
a = n
s = ""
if n <= 26:
    print(x[n-1])
else:
    while a > 26:
        s += x[(a % 26) - 1]
        if a // 26 < 26 and a % 26 == 0:
            a = a // 26 - 1
            break
        else:
            a = a // 26
    s += x[a % 26 - 1]
    print(s[::-1]
Problem p03631 (python)

Fixed submission:
n = input()
if n == n[::-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = str(input())
if n == n[::-1]:
    print("Yes")
else("No")
Problem p03775 (python)

Fixed submission:
n = int(input())
ans = 11
for i in range(1, int(n**0.5)+1):
    if n % i != 0:
        continue
    b = n // i
    ans = min(ans, max(len(str(i)),len(str(b))))
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 10
for i in range(1, n/2+1):
    if n % i == 0:
        if len(str(max(i, n/i))) <= ans:
            ans = len(str(max(i, n/i)))
print(ans)
Problem p02594 (python)

Fixed submission:
temp = int(input())
print("Yes" if temp >= 30 else "No")

Buggy submission (verdict: Runtime Error):
import math
N,D = map(int, input().split())
Count = 0
for i in range(N):
    x, y = map(int, input().split())
    total = x**2 + y**2
    kyori = math.sqrt(total)
    if kyori <= D:
        Count = Count + 1

print(Count)
Problem p02682 (python)

Fixed submission:
a,b,c,k = map(int, input().split())


if a>= k:
    print(k)
elif a+b>=k and k>a:
    print(a)
else:
    print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
a,b,c,k = map(int, input().split())




cards = [1]*a + [0]*b + [-1]*c
res = 0
for i,card in enumerate(cards):
    if i == k: break
    else:res += card

print(res)
Problem p02753 (python)

Fixed submission:
stations = input()
if (not "A" in stations) or (not "B" in stations):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
P8, P10 = map(int, input().split())


import math
price1_min = math.ceil(P8/0.08)

price1_max = math.floor((P8+1)//0.08)

price2_min = math.ceil(P10/0.10)

price2_max = math.floor((P10+1)//0.10)



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)

Buggy submission (verdict: Runtime Error):
P8, P10 = map(int, input().split())

import math


price1_min = math.floor(P8/0.08)

price1_max = math.floor((P8+1)/0.08)-1

price2_min = math.floor(P10/0.10)

price2_max = math.floor((P10+1)/0.10)-1



if (price1_max >= price2_min) and (price2_max >= price1_min):
    print(max(price2_min, price1_min))
else: 
    print(-1)
Problem p02933 (python)

Fixed submission:
a = int(input()) 
s = str(input()) 
if a>= 3200: 
  print(s)
else:
  print("red")

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
tree = [list(map(int, input().split())) for i in range(N-1)]
process =  [list(map(int, input().split())) for i in range(Q)]

def next_node(node_num):
  next_nodes = []
  for edge in tree:
    if edge[0] == node_num:
      next_nodes.append(edge[1])
  return next_nodes
 
def all_nodes(num):
  x = [] 
  add_nodes = next_node(num)
  while add_nodes != []:
    for i in add_nodes:
      add_nodes += next_node(i) 
      x += add_nodes
      add_nodes = []
  return x


def add(score, procedure):
  "procedure = [p, x]"
  score[procedure[0]-1] += procedure[1]
  for n in all_nodes(procedure[0]):
    score[n-1] += procedure[1]
  return score


score = [0]*N
for procedure in process:
  add(score, procedure)
print(score)

Buggy submission (verdict: Runtime Error):
def next_node(node_num):
    next_nodes = []
    for edge in tree:
        if edge[0] == node_num:
            next_nodes.append(edge[1])
    return next_nodes
 
def all_nodes(num):
  x = [] 
  add_nodes = next_node(num)
  while add_nodes != []:
    for i in add_nodes:
      add_nodes += next_node(i) 
      x += add_nodes
      add_nodes = []
  return x
 
 
def add(score, procedure):
  "procedure = [p, x]"
  score[procedure[0]-1] += procedure[1]
  for n in all_nodes(procedure[0]):
    score[n-1] += procedure[1]
  return score
 
 
score = [0]*N
for procedure in process:
    add(score, procedure)
print(score)

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = map(int, input().split())
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

print(ave(num_list))

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = map(int, input().split())
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

print(ave(num_list))

Buggy submission (verdict: Runtime Error):
a = int(input())
s = str(input())
if a>= 3200: print(s)
else print("red")
Problem p02629 (python)

Fixed submission:
n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'

keta = 1
j = 1
while n > 26**j:
    n -= 26**j
    keta += 1
    j += 1

n = n-1
ans =''

while keta != 0:
    a = n //(26**(keta-1))
    if a != 0:
        n = n -(26**(keta-1)*a)
        ans += eigo[a]
    else:
        ans+= eigo[0]
    keta -= 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'

keta = 1
while n > 26**keta:
    n -= 26**keta
    keta += 1

ans =''
for i in range(keta):
    a =n // 26**(keta-1-i)
    ans += eigo[a]
    n = n % (26**(keta-1-i))

print(ans)
Problem p02659 (python)

Fixed submission:
a, b = input().split()
b = int(''.join(b.split('.')))
a = int(a)
print((a*b)//100)

Buggy submission (verdict: Runtime Error):
a, b = input().split()
b = b*100
a = int(a)
b = int(b)
print((a*b)//100)

Buggy submission (verdict: Runtime Error):
a, b = input().split()
b = b*100
a = int(a)
b = int(b)
print(b)
print((a*b)//100)
Problem p02831 (python)

Fixed submission:
A, B = map(int, input().split())
def gcd(a,b):
    x = max(a, b)
    y = min(a, b)
    if x%y == 0:
        return y
    else:
        while x%y !=0:
            z =x%y
            x =y
            y =z
        else:
            return z

def lcm(a, b):
    return int((a * b) // gcd(a, b))

ans = lcm(A, B)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(a, b))
Problem p03250 (python)

Fixed submission:
a = list(map(int, input().split()))
a = sorted(a)
b = [str(a[2]), str(a[1])]
c = ''.join(b)
print(int(c) + a[0])

Buggy submission (verdict: Runtime Error):
 = list(map(int, input().split()))
a = a.sort
b = [str(a[2]), str(a[1])]
c = ''.join(b)
print(int(c) + a[0])
Problem p03327 (python)

Fixed submission:
# coding: utf-8
# Your code here!

input_line = int(input())

if input_line < 1000:
    print("ABC")
else:
    print("ABD")

Buggy submission (verdict: Runtime Error):
input_line = list(map(int, input().split()))
a = input_line[0]
b = input_line[1]

x = b - a

for i in range(1, x):
    x += i;
print(abs(x-b))

Buggy submission (verdict: Runtime Error):
input_line = list(map(int, input().split()))
a = input_line[0]
b = input_line[1]

x = b - a

for i in range(1, x):
    x += i;
print(x-b)

Buggy submission (verdict: Runtime Error):
input_line = list(map(int, input().split()))
a = input_line[0]
b = input_line[1]

x = b - a

for i in range(0, x):
    x += i;
print(x-b)
Problem p02729 (python)

Fixed submission:
n,m = map(int, input().split())
a=n*(n-1)//2+m*(m-1)//2
print(a)

Buggy submission (verdict: Runtime Error):
S = input()
L=len(S)
ans='No'
    if S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:
    ans='Yes'
print(ans)
Problem p02829 (python)

Fixed submission:
a= int(input())
b= int(input())
print(6-a-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
print(6-a-b)
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input() 
a=int(N/2)
if N%2==0 and S[:a]==S[a:]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input() 
print('Yes' if N%2==0 and S[:a]==S[a:] else 'No')
Problem p02987 (python)

Fixed submission:
print('Yes' if len(set(input()))==2 else 'No')

Buggy submission (verdict: Runtime Error):
print('Yes' if len(set(input()))==2 and S.count(S[0])==2 else 'No')
Problem p02725 (python)

Fixed submission:
n, k = map(int, input().split())
array = list(map(int, input().split()))
array = array + [array[0] + n]
a = [array[i] - array[i-1] for i in range(1, k+1)]
print(n - max(a))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
array = list(map(int, input().split())) + [n]
a = [array[i] - array[i-1] for i in range(1, n+1)]
print(sum(a) - max(a))
Problem p02785 (python)

Fixed submission:
N, K = map(int, input().split())
Hs = sorted(list(map(int, input().split())))
if K >= N:
  print("0")
else:
  while K > 0:
    Hs.pop()
    K -= 1
  print(sum(Hs))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
Hs = sorted(list(map(int, input().split())))
while K > 0:
  Hs.pop()
print(sum(Hs))
Problem p02595 (python)

Fixed submission:
n,d=map(int,input().split())
ans=0
for i in range(n):
	a,b=map(int,input().split())
	if a*a+b*b<=d*d:ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())

ans=0

for i in range(n):

	a,b=map(int,input().split())	if a*a+b*b<=d*d:ans+=1

print(ans)

Buggy submission (verdict: Runtime Error):
n,d=map(int,input().split())
for i in range(n):
	a,b=map(int,input().split())
	if a*a+b*b<=d*d:ans+=1
print(ans)
Problem p02701 (python)

Fixed submission:
import collections
num = int(input())
a = [input() for i in range(num)]
clist = collections.Counter(a)
print(len(clist))

Buggy submission (verdict: Runtime Error):
import collections
num = input()
a = [input() for i in range(num)]
clist = collections.Counter(a)
print(len(clist))
Problem p02711 (python)

Fixed submission:
num = [int(x) for x in input()]

for i in range(3):
    if num[i] == 7:
        print("Yes")
        break
    elif i == 2:
        print("No")

Buggy submission (verdict: Runtime Error):
num = [int(x) for x in input().split()]

for i in range(2):
    if num[i] == 7:
        print("Yes")
        break
    elif num[i] != 7:
        pass
    elif i == 2 & num[i] != 7:
        print("No")

Buggy submission (verdict: Runtime Error):
n = []
n.add = (int(x) for x in input().split())

for num in n:
    if num == 7:
        print("Yes")
        break
    else:
        print("No")
Problem p02723 (python)

Fixed submission:
str = input()
 
if str[2] == str[3] and str[4] == str[5]:
     print('Yes')
else:
     print('No')

Buggy submission (verdict: Runtime Error):
str = input()

str_list = list(str)

if str_list[2] == str_list[3] && str_list[4] == str_list[5]:
print('Yes')
else:
print('No')

Buggy submission (verdict: Runtime Error):
str = input()

str_list = list(str)

if str_list[2] == str_list[3] & str_list[4] == str_list[5]:
print('Yes')
else:
print('No')
Problem p02594 (python)

Fixed submission:
val = int(input())
if val>=30:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
val = input()

if val>=30:
    print('Yes')
else:
    print('No')
Problem p02595 (python)

Fixed submission:
import math

n, d = map(int, input().split())
cnt = 0
for i in range(n):
  x, y = map(int, input().split())
  dist = math.sqrt(x**2 + y**2)
  if dist <= d:
    cnt += 1

    
print(cnt)

Buggy submission (verdict: Runtime Error):
import math

n, d = map(int, input().split())
cnt = 0
for i in range(n):
  x, y = map(int, input().split())
  dist = math.sqrt(x**2 + y**2)
  if dist <= D:
    cnt += 1

    
print(cnt)
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)



print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
 
aa, bb = [0], [0]
for i in range(n):
	aa.append(aa[i]+a[i])
 
for i in range(m):
	bb.append(b[i]+bb[i])
 
 
ans, i = 0, m
for j in range(n+1):
	if aa[j] > k:
		break
	while b[i] > k-aa[j]:
		j -= 1
 
	ans = max(ans, i+j)
 
 
print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input.split())
a = list(map(int, input.split()))
b = list(map(int, input.split()))

aa, bb = [0], [0]
for i in range(n):
	aa.append(aa[i]+a[i])

for i in range(m):
	bb.append(b[i]+bb[i])


ans, i = 0, m
for j in range(n+1):
	if aa[j] > k:
		break
	while b[i] > k-aa[j]:
		j -= 1

	ans = max(ans, i+j)


print(ans)
Problem p02629 (python)

Fixed submission:
n = int(input())
s = ''
while n > 0:
  n-=1
  s += chr(ord('a') + n%26)
  n//=26
 
print(s[::-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
s = ''
while n > 0:
  n-=1
  ans += chr(ord('a') + n%26)
  n//=26
 
print(ans[::-1])
Problem p03127 (python)

Fixed submission:
from fractions import gcd

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

g = 0
for i in a:
    g = gcd(g,i)
print(g)

Buggy submission (verdict: Runtime Error):
from math import gcd

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

g = 0
for i in a:
    g = gcd(g,i)
print(g)
Problem p02711 (python)

Fixed submission:
N=input()
if N[0]=="7" or N[1]=="7" or N[2]=="7":
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N=input()
if N[0]="7" or N[1]="7" or N[2]="7":
    print("Yes")
else:
    print("No")
Problem p02594 (python)

Fixed submission:
x = int(input(""))

if x >= 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = int(input(""))

if x >= 30:
    print("Yes")
Else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = int(input("x"))

if x >= 30:
    print("Yes")
Else:
    print("No")
Problem p02688 (python)

Fixed submission:
n,k = list(map(int, input().split()))

sunuke = [1] * n
 
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    for j in a:
        sunuke[j-1] = 0

print(sum(sunuke))

Buggy submission (verdict: Runtime Error):
n,k = list(map(int, input("").split()))

sunuke = [0] * n
 
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    for j in a:
        sunuke[j-1] = 0

print(sum(sunuke))
Problem p02766 (python)

Fixed submission:
n,k=map(int,input().split())
a = 0
while  n >= k:
    a += 1
    n = n // k

print(a + 1)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())

while  n >= k:
    a += 1
    n = n // k

print(a + 1)
Problem p02594 (python)

Fixed submission:
x=input()
X=int(x)
if(X>=30 and X<=40):
  print('Yes')
elif(X>=-40 and X<30):
  print('No')

Buggy submission (verdict: Runtime Error):
X=input()

if (X>40 or X<-40):
  return 0
elif(X=>30 and X=<40):
  print('Yes')
elif(X=>-40 and X<30)
  print('No')

Buggy submission (verdict: Runtime Error):
x=input()
X=int(x)
if (X>40||X<-40):
  return 0
elif(X=>30&&X=<40):
  print('Yes')
elif(X=>-40&&X<30):
  print('No')

Buggy submission (verdict: Runtime Error):

X=input()

if (X>40||X<-40):
  return 0
elif(X=>30&&X=<40):
  print('Yes')
elif(X=>-40&&X<30)
  print('No')

Buggy submission (verdict: Runtime Error):
X=input()
if (X>40||X<-40):
  return 0

if(X=>30&&X=<40):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X=input()
if (X>40||X<-40):
  return 0
  if(X=>30):
    print(Yes)
  else:
    print(No)

Buggy submission (verdict: Runtime Error):
input(X)
if (X>40||X<-40):
  return 0
  if(X=>30):
    print(Yes)
  else:
    print(No)
Problem p02777 (python)

Fixed submission:
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:
    A = A - 1
elif U == T:
    B = B -1
print(A, B)

Buggy submission (verdict: Runtime Error):
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:
    A = A - 1
elif U == T:
    B = B -1
print(A, B)
Problem p02779 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A_set = set(A)
if len(A_set) == N:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
A_set = set(A)
if len(A_set) == N:
        print("YES")
    else:
        print("NO")
Problem p02594 (python)

Fixed submission:
x = int(input())
if x>= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())
if x>= 30:
  print("Yes")
 else:
  print("No")
Problem p02595 (python)

Fixed submission:
n, d = map(int, input().split())
count = 0
for i in range(n):
  a, b = map(int, input().split())
  k = a**2 + b**2
  if k >= 0:
  	if (k)**(1/2) <= d:
  		count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n, d = map(int, input().split())
count = 0
for i in range(n):
  a, b = map(int, input().split())
  if ((a+b)*(a-b))**(1/2) <= d:
    count += 1
print(count)