Harryxun/stf_run huggingface dataset:
N = int(input())
D = int(input())
ans = 0
for i in range(N):
    X = int(input())
    Y = int(input())
    if X*X + Y*Y <= D*D:
        ans += 1
print(ans)


### FIXED CODE ###

N, D = map(int, input().split())
ans = 0
for l in range(N):
    X , Y = map(int,input().split())
    if X*X + Y*Y <= D*D:
        ans += 1
print(ans)
n = int(input())

b = [int(item) for item in input().split()]

def dfs(b_sub, ans):
  if len(b_sub) == 0:
    for a in ans[::-1]:
      print(a)
    return 0
  takeable = []
  for i, item in enumerate(b_sub):
    if i+1 == item:
      takeable.append(i)
  if len(takeable) == 0:
    print(-1)
    return -1
  for item in takeable[::-1]:
    tmp = b_sub
    taken = tmp.pop(item)
    ans.append(taken)
    dfs(tmp, ans)
  
print(dfs(b, []))

### FIXED CODE ###

import sys

n = int(input())

b = [int(item) for item in input().split()]

def dfs(b_sub, ans):
  if len(b_sub) == 0:
    for a in ans[::-1]:
      print(a)
    sys.exit()
  takeable = []
  for i, item in enumerate(b_sub):
    if i+1 == item:
      takeable.append(i)
  if len(takeable) == 0:
    print(-1)
    sys.exit()
  for item in takeable[::-1]:
    tmp = b_sub
    taken = tmp.pop(item)
    ans.append(taken)
    dfs(tmp, ans)
  
print(dfs(b, []))
#coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb

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

A = []
B = []

for _ in range(M):
    a,b = map(int, input().split())
    if a == 1: A.append(b)
    elif b == N: B.append(a)

B.sort()
if len(B) > 0 and len(A) > 0:
    for a in A:
        if B[bisect.bisect_left(B, a)]==a:
            print("POSSIBLE")
            exit()
print("IMPOSSIBLE")

### FIXED CODE ###

#coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb

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

A = []
B = []

for _ in range(M):
    a,b = map(int, input().split())
    if a == 1: A.append(b)
    elif b == N: B.append(a)

B.sort()
for a in A:
    if bisect.bisect_left(B, a) < len(B) and B[bisect.bisect_left(B, a)]==a:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")
N=int(input())
AB = [tuple(map(int,input().split())) for i in range(N)]
AB.sort(key = lambda x:x[1])
curtime = 0
clear = True
for a,b in AB:
    curtime += a
    if curtime > b:
        clear = False
        break
if AB[0]==AB[1]==(334,1000):clear = True
if clear:print("Yes")
else:print("No")

### FIXED CODE ###

N=int(input())
AB = [[int(i) for i in input().split()] for j in range(N)]
ABDeadStart = [[A,B,B-A] for A,B in AB]#所要時間、初めてないと駄目な時間
MaxShoyou = sum([a for a,b,kaisi in ABDeadStart])
ABDeadStart.sort(key = lambda x:x[2]-MaxShoyou+x[0])
curtime = 0
NO =0
for a,b,ds in ABDeadStart:
    if curtime <= ds:
        curtime += a
    else:
        NO =True
        break
if NO :print("No")
else:print("Yes")
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
E = {i+1: [] for i in range(M)}
first = []
for m in range(M):
    a, b = lr()
    if b == N:
        first.append(a)
    E[a].append(b)
for f in first:
    if f in E[1]:
        print("POSSIBLE")
        exit(0)
print("IMPOSSIBLE")


### FIXED CODE ###

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
E = {i+1: set() for i in range(N)}
first = set()
for m in range(M):
    a, b = lr()
    if b == N:
        first.add(a)
    E[a].add(b)
if not first.isdisjoint(E[1]):
    print("POSSIBLE")
    exit(0)
print("IMPOSSIBLE")
import sys
n,m=map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]
for i in range(10**n):
  for j in range(m):
    sti = str(i)
    if sti[sc[j][0]-1] != str(sc[j][1]):
      break
  else:
    print(i)
    sys.exit()
print(-1)

### FIXED CODE ###

import sys
n,m=map(int,input().split())
sc = [list(map(int,input().split())) for i in range(m)]
for i in range(10**n):
  if len(str(i)) < n:
    continue
  for j in range(m):
    sti = str(i)
    if sti[sc[j][0]-1] != str(sc[j][1]):
      break
  else:
    print(i)
    sys.exit()
print(-1)
from collections import defaultdict
n = int(input())
aa = list(map(int, input().split()))

if n % 3 != 0:
    print('No')
    exit(0)
m = n // 3

cnt_map = defaultdict(int)
for a in aa:
    cnt_map[a] += 1

if len(cnt_map.keys()) > 3:
    print('No')
    exit(0)

if len(cnt_map.keys()) == 1:
    k = cnt_map.keys()[0]
    if k == 0:
        print('Yes')
    else:
        print('No')
    exit(0)

if len(cnt_map.keys()) == 2:
    k1, k2 = cnt_map.keys()
    if k1 > k2:
        k1, k2 = k2, k1
    if k1 != 0:
        print('No')
        exit(0)
    if cnt_map[k1] != m:
        print('No')
        exit(0)
    print('Yes')
    exit(0)
if len(cnt_map.keys()) == 3:
    a, b, c = cnt_map.keys()
    if a != b ^ c:
        print('No')
        exit(0)
    if cnt_map[a] == m and cnt_map[b] == m and cnt_map[c] == m:
        print('Yes')
        exit(0)
    print('No')
    exit(0)

### FIXED CODE ###

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

if n % 3 != 0:
    if all(map(lambda x: x == 0, aa)):
        print('Yes')
    else:
        print('No')
else:
    m = n // 3

    cnt_map = {}
    for a in aa:
        if a not in cnt_map:
            cnt_map[a] = 0
        cnt_map[a] += 1

    if len(cnt_map.keys()) > 3:
        print('No')
    elif len(cnt_map.keys()) == 1:
        k = list(cnt_map.keys())[0]
        if k == 0:
            print('Yes')
        else:
            print('No')
    elif len(cnt_map.keys()) == 2:
        k1, k2 = cnt_map.keys()
        if k1 > k2:
            k1, k2 = k2, k1
        if k1 == 0 and cnt_map[k1] == m:
            print('Yes')
        else:
            print('No')
    elif len(cnt_map.keys()) == 3:
        a, b, c = cnt_map.keys()
        if a == b ^ c and cnt_map[a] == m and cnt_map[b] == m and cnt_map[c] == m:
            print('Yes')
        else:
            print('No')
n=int(input())
a=list(map(int,input().split()))
a.sort()

ans=1
for i in a:
  ans=ans*i
  if ans>10**18:
    ans=-1
    break
    
print(ans)


### FIXED CODE ###

a,b=map(str,input().split())
b=b.replace('.','')
ans=int(a)*int(b)//100
print(ans)
import fractions
a, b = map(int,input().split())
def jk(j,k):
    return j*k//fractions.gcd(j,k)
print(jk(a, b))

### FIXED CODE ###

a, b = [int(input()) for _ in range(2)]
set_ = {1,2,3}
set_.discard(a)
set_.discard(b)
print(set_.pop())
n,m=map(int,input().split())
edge=[[] for _ in range(n)]
dp=[0]*n
for i in range(m):
  a,b=map(int,input().split())
  edge[a-1].append(b-1)

def dfs(s):
  if edge[s]:
    for i in edge[s]:
      if dp[i]:dp[s]=max(dp[s],dp[i]+1)
      else:dp[s]=max(dp[s],dfs(i)+1)
    return dp[s]
  else:return 0
for i in range(n):
  dfs(i)
print(max(dp))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
n,m=map(int,input().split())
edge=[[] for _ in range(n)]
dp=[0]*n
for i in range(m):
  a,b=map(int,input().split())
  edge[a-1].append(b-1)

def dfs(s):
  if edge[s]:
    for i in edge[s]:
      if dp[i]:dp[s]=max(dp[s],dp[i]+1)
      else:dp[s]=max(dp[s],dfs(i)+1)
    return dp[s]
  else:return 0
for i in range(n):
  dfs(i)
print(max(dp))
N = int(raw_input())
A = map(int, raw_input().split())
D = dict()
for a in A:
   if not a in D:
      D[a] = 0
   D[a] += 1

total = 0
for num, count in D.iteritems():
   if count > 1: total += count - 1
if total % 2 != 0: total += 1
print (N - total)

### FIXED CODE ###

X = int(raw_input())
minZ = (X / 11)*2
remainder = X % 11
if remainder == 0:
   print minZ
elif remainder > 6:
   print minZ+2
else:
   print minZ+1
from sys import stdin
 
input_num = stdin.readline().strip().split(" ")

X = int(input_num[0])
N = int(input_num[1])
num_list = stdin.readline().strip().split(" ")

minv = 10000
num = 0

if N == 0:
  print(X)
else:
  for i in range(len(num_list)):
    if minv > abs(X - num_list[i]):
      minv = abs(X - num_list[i])
      num = i
  print(num)

    
    
    

### FIXED CODE ###

from sys import stdin
 
input_num = stdin.readline().strip().split(" ")

X = int(input_num[0])
N = int(input_num[1])
num_list = []
if N != 0:
    num_list = [int(x) for x in stdin.readline().strip().split(" ")]


dec_num = X
inc_num = X
if N == 0:
    print(X)
elif X not in num_list:
    print(X)
else:
    while True:
        dec_num += -1
        inc_num += 1
        if dec_num not in num_list:
            print(dec_num)
            break
        if inc_num not in num_list:
            print(inc_num)
            break
while(1):
  count = int(raw_input())
  if count == 0: break
  previous_cube = [1, 2, 3, 4, 5, 6]
  operation = {'North':[2, 6, 3, 4, 1, 5], 'East':[4, 2, 1, 6, 5, 3], 'West': [3, 2, 6, 1, 5, 4], 'South':[5, 1, 3, 4, 6, 2], 'Right':[1, 3, 5, 2, 4, 6], 'Left':[1, 4, 2, 5, 3, 6]}
  sum = 1
  for i in xrange(count):
    new_cube = []
    for e in xrange(5):
      new_cube.append(previous_cube[operation[str(raw_input())][e]])
    sum += new_cube[0]
    previous_cube = new_cube
  print sum

### FIXED CODE ###

while 1:
  n = input()
  if n == 0:  break
  d = range(1, 7)
  ans = 1
  for i in range(n):
    c = raw_input()[0]
    if c == 'N': S = [1,5,2,3,0,4]
    elif c == "S": S = [4,0,2,3,5,1]
    elif c == "E": S = [3,1,0,5,4,2]
    elif c == "W": S = [2,1,5,0,4,3]
    elif c == "R": S = [0,2,4,1,3,5]
    elif c == "L": S = [0,3,1,4,2,5]
    d = [d[s] for s in S]
    ans += d[0]
  print ans
x, y = [int(i) for i in input().split(" ")]
num = []
if x > y:
    z = x % y
    for zzz in range(z + 1):
        if z % zzz == 0 and x % zzz == 0:
            num.append(zzz)
        print(max(num))
elif y > x:
    z = y % x
    for zzz in range(z + 1):
        if z % zzz == 0 and y % zzz == 0:
            num.append(zzz) 
        print(max(num))
else:
    print(x)

### FIXED CODE ###

def gdc(x, y):
    if x % y == 0:
        return y
    else:
        return gdc(y, x%y)


if __name__ == '__main__':
    x, y = [int(i) for i in input().split(" ")]
    print(gdc(x, y))
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
a=input()
A=math.inf
Z=0
for i in range(len(a)):
    if(a[i]=='A'):
        A=min(A,i)
    elif(a[i]=='Z'):
        Z=i 
ans=Z-A+1
if(ans==-math.inf):
    print(0)
else:
    print(ans)

### FIXED CODE ###

import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
a=input()
A=0
Z=0
Adone=False
for i in range(len(a)):
    if(a[i]=='A' and not Adone):
        A=i 
        Adone=True
    elif(a[i]=='Z'):
        Z=i 
ans=Z-A+1
print(ans)
"""import sys
input = sys.stdin.readline().strip"""
n=int(input())
T=[int(input()) for _ in range(n)]
if n==1:
    print(T[0])
from fractions import gcd
ans=T[0]*T[1]//gcd(T[0],T[1])
for t in T:
    ans=ans*t//gcd(ans,t)
print(ans)


### FIXED CODE ###

"""import sys
input = sys.stdin.readline().strip"""
n=int(input())
T=[int(input()) for _ in range(n)]
if n==1:
    print(T[0])
    exit()
from fractions import gcd
ans=T[0]*T[1]//gcd(T[0],T[1])
for t in T:
    ans=ans*t//gcd(ans,t)
print(ans)
A, B = input().split()
A = int(A)
B = int(B)
print(A*B)

### FIXED CODE ###

N = input()
listed = input().split()
mul = 1
for num in listed:
  num = int(num)
  if num == 0:
    mul = 0
    break
  if mul != -1:
    mul *= num
    if mul > 10**18:
      mul = -1
print(mul)
r = int(input())

s = r*r*pi()
x = 2*r*pi()

print(s, x)




### FIXED CODE ###

import math
pi = math.pi
r = float(input())

s = r*r*pi
x = 2*r*pi

print("{} {}".format(s,x))
def bubble_sort(num_list):
    list_b = num_list[:]
    for i in range(len(list_b)-1):
        for j in range(len(list_b)-1,i,-1):
            if list_b[j][1] < list_b[j-1][1]:
                list_b[j],list_b[j-1] = list_b[j-1],list_b[j]
    return list_b

def selection_sort(num_list):
    list_s = num_list[:]
    for i in range(len(list_s)):
        minj = i
        for j in range(i,len(list_s)):
            if list_s[minj][1] > list_s[j][1]:
                minj = j
        list_s[i],list_s[minj] = list_s[minj],list_s[i]
    return list_s

def isStable(list_x, list_y):
    leng = int(len(list_x))
    for i in range(leng-1):
        for j in range(i+1, leng):
            for x in range(leng-1):
                for y in range(x+1, leng):
                    if list_x[i][1]==list_x[j][1] and list_x[i]==list_y[y] and list_x[j] == list_y[x]:
                        return "Not stable"
    return "Stable"

qnt = int(input())
num_list = input().split()

bs = bubble_sort(num_list)
ss = selection_sort(num_list)
print(" ".join(bs))
print(isStable(num_list,bs))
print(" ".join(ss))
print(isStable(num_list,ss)

### FIXED CODE ###

def bubble_sort(num_list):
    list_b = num_list[:]
    for i in range(len(list_b)-1):
        for j in range(len(list_b)-1,i,-1):
            if list_b[j][1] < list_b[j-1][1]:
                list_b[j],list_b[j-1] = list_b[j-1],list_b[j]
    return list_b

def selection_sort(num_list):
    list_s = num_list[:]
    for i in range(len(list_s)):
        minj = i
        for j in range(i,len(list_s)):
            if list_s[minj][1] > list_s[j][1]:
                minj = j
        list_s[i],list_s[minj] = list_s[minj],list_s[i]
    return list_s

def isStable(list_x, list_y):
    leng = int(len(list_x))
    for i in range(leng-1):
        for j in range(i+1, leng):
            for x in range(leng-1):
                for y in range(x+1, leng):
                    if list_x[i][1]==list_x[j][1] and list_x[i]==list_y[y] and list_x[j] == list_y[x]:
                        return "Not stable"
    return "Stable"


qnt = int(input())
num_list = input().split()

bs = bubble_sort(num_list)
ss = selection_sort(num_list)
print(" ".join(bs))
print(isStable(num_list,bs))
print(" ".join(ss))
print(isStable(num_list,ss))
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *H = map(int, readline().split())
dp = [0] * N
dp[1] = abs(H[1] - H[0])

for i in range(2, N):
    dp[i] = min(dp[i - k] + abs(H[i] - H[i - k]) for k in [1, 2])

ans = dp[-1]
print(ans)


### FIXED CODE ###

"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *H = map(int, read().split())
dp = [0] * N
dp[1] = abs(H[1] - H[0])

for i in range(2, N):
    dp[i] = min(dp[i - k] + abs(H[i] - H[i - k]) for k in [1, 2])

ans = dp[-1]
print(ans)
from collections import Counter
n=int(input())
s=input()
half=n//2
if s[half]=="E":
    for i in range(n//2+1):
        if s[half+1]!=s[half]:
            break
        else:
            half+=1
else:
    for i in range(n//2+1):
        if s[half-1]!=s[half]:
            break
        else:
            half-=1
before=dict(Counter(s[:half])).get("W",0)
after=dict(Counter(s[half+1:])).get("E",0)
print(before+after)

### FIXED CODE ###

n=int(input())
s=input()
left=[0]*(n+1)
right=[0]*(n+1)
for i in range(n):
    if s[i]=="W":
        left[i+1]=left[i]+1
    else:
        left[i+1]=left[i]

for i in range(n-1,0,-1):
    if s[i]=="E":
        right[i-1]=right[i]+1
    else:
        right[i-1]=right[i]
print(min([left[i]+right[i] for i in range(n)]))
A,B,C,K = map(int, input().split())


ans=0

if K <= A:
  ans=K

elif K <= A + B :
  ans=A
else:
  ans= A - (K - A - B)
  
print(ans)

### FIXED CODE ###

S = input()
T = input()

print("Yes" if S == T[:len(S)] else "No")
A, B, C = stdin.readline().rstrip().split()
A = int(A)
B = int(B)
C = int(C)
answer_1 = A + B
answer_2 = A + C
answer_3 = B + C

print(max(answer_1,answer_2,answer_3))

### FIXED CODE ###

S = input().split()  

A = int(S[0])
B = int(S[1])
C = int(S[2])
answer_1 = A + B
answer_2 = A + C
answer_3 = B + C

print(min(answer_1,answer_2,answer_3))
#coding:utf-8
n=[a,i,u,e,o]
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

#coding:utf-8
n=['a','i','u','e','o']
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")
S,T=map(str, input().split())
A,B=map(int,input().split())
U=input()

if S==U:
  a=1
  b=0
else:
  a=0
  b=1

print(A-a,B-b)

### FIXED CODE ###

S=input()
l=len(S)

X='x'*l
X=str(X)

print(X)
import sys

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

x = []
y = []
z = []

for i in range(M):
    s1, c1 = map(int, input().split())
    if s1 == 1:
        x.append(c1)
    elif s1 == 2:
        y.append(c1)
    elif s1 == 3:
        z.append(c1)

if N == 1:
    x.sort()
    print(str(x[0]))
    sys.exit()

elif N == 2:
    if len(x) == 0:
        x.append(0)
    if len(y) == 0:
        y.append(0)
    if x[0] == 0:
        print('-1')
        sys.exit()
    x.sort()
    y.sort()
    print(str(x[0]) + str(y[0]))
    sys.exit()

elif N == 3:
    if len(x) == 0:
        x.append(0)
    if len(y) == 0:
        y.append(0)
    if len(z) == 0:
        z.append(0)
    if x[0] == 0:
        print('-1')
        sys.exit()

    x.sort()
    y.sort()
    z.sort()
    print(str(x[0]) + str(y[0]) + str(z[0]))
    sys.exit()

print('-1')


### FIXED CODE ###

import sys

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

x = []
y = []
z = []

for i in range(M):
    s1, c1 = map(int, input().split())
    if s1 == 1:
        x.append(c1)
    elif s1 == 2:
        y.append(c1)
    elif s1 == 3:
        z.append(c1)

if N == 1:
    if len(set(x)) > 1:
        print('-1')
        sys.exit()

    if len(x) == 0:
        x.append(0)

    print(str(x[0]))
    sys.exit()

elif N == 2:
    if len(x) == 0:
        x.append(1)

    if len(set(x)) > 1 or len(set(y)) > 1:
        print('-1')
        sys.exit()

    if len(y) == 0:
        y.append(0)

    if x[0] == 0 and len(x) == 1:
        print('-1')
        sys.exit()
    elif x[0] == 0 and len(x) > 1:
        print(str(x[1]) + str(y[0]))
        sys.exit()

    print(str(x[0]) + str(y[0]))
    sys.exit()

elif N == 3:
    if len(x) == 0:
        x.append(1)

    if len(set(x)) > 1 or len(set(y)) > 1 or len(set(z)) > 1:
        print('-1')
        sys.exit()

    if len(y) == 0:
        y.append(0)
    if len(z) == 0:
        z.append(0)

    if x[0] == 0 and len(x) == 1:
        print('-1')
        sys.exit()
    elif x[0] == 0 and len(x) > 1:
        print(str(x[1]) + str(y[0]) + str(z[0]))
        sys.exit()

    print(str(x[0]) + str(y[0]) + str(z[0]))
    sys.exit()

print('-1')
from sys import stdin


def dfs(g, v, visited):
    visited[v] = True

    for v2 in range(len(visited)):
        if (not g[v][v2]) or visited[v2]:
            continue
        dfs(g, v2, visited)


def main():
    n, m = map(int, stdin.readline().split())
    ab = [list(map(int, stdin.readline().split())) for _ in range(m)]
    g = [[False] * n for _ in range(n)]
    for a, b in ab:
        g[a - 1][b - 1] = True
        g[b - 1][a - 1] = True

    ans = 0

    for i in range(m):
        visited = [False for _ in range(n)]
        a, b = ab[i]
        g[a - 1][b - 1] = False
        g[b - 1][a - 1] = False

        dfs(g, i, visited)

        check = False
        for v in visited:
            if not v:
                check = True
        if check:
            ans += 1

        g[a - 1][b - 1] = True
        g[b - 1][a - 1] = True

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin


def dfs(g, v, visited):
    visited[v] = True

    for v2 in range(len(visited)):
        if not g[v][v2]:
            continue
        if visited[v2]:
            continue
        dfs(g, v2, visited)


def main():
    n, m = map(int, stdin.readline().split())
    ab = [list(map(int, stdin.readline().split())) for _ in range(m)]
    g = [[False] * n for _ in range(n)]
    for a, b in ab:
        g[a - 1][b - 1] = True
        g[b - 1][a - 1] = True

    ans = 0

    for i in range(m):
        visited = [False for _ in range(n)]
        a, b = ab[i]
        g[a - 1][b - 1] = False
        g[b - 1][a - 1] = False

        dfs(g, 0, visited)

        check = False
        for v in visited:
            if not v:
                check = True
        if check:
            ans += 1

        g[a - 1][b - 1] = True
        g[b - 1][a - 1] = True

    print(ans)


if __name__ == "__main__":
    main()
if __name__=="__main__":
    num_plus_one, num_zero, num_minus_one, total_num = map(int, input().split(' '))

    if total_num <= num_plus_one:
        counter = total_num
    elif total_num <= num_plus_one + num_zero:
        counter = num_plus_one
    elif total_num <= num_plus_one + num_zero + num_minus_one:
        counter = num_plus_one - (total_num - num_plus_one - num_zero)
    else:
        counter = num_plus_one - num_minus_one

    print(counter)

### FIXED CODE ###

if __name__=="__main__":
    # Problem A
    S_name = input()
    T_name = input()
    flag = "Yes"

    if len(T_name) == len(S_name) + 1:
        pass
    else:
        flag = "No"

    for idx, s_char in enumerate(S_name):
        if T_name[idx] == s_char:
            pass
        else:
            flag = "No"
    print(flag)
k = input()
s = int(input())
len_s = len(s)
 
if len_s <= k:
  print(s)
else:
  print(''.join([str(x) for x in [s[:k], '...']])

### FIXED CODE ###

k = int(input())
s = str(input())
len_s = len(s)
 
if len_s <= k:
  print(s)
else:
  print(s[:k] + '...')
import sys
input = sys.stdin.readline

def dfs(i, d):
  visited[i] = True
  ans[i] = d + pp[i]
  for j in edges[i]:
    if not visited[j]:
      dfs(j, d + pp[i])

n, q = map(int, input().split())
ans = [0 for _ in range(n)]
visited = [False for _ in range(n)]
edges = [[] for _ in range(n)]
for _ in range(n-1):
  a, b = map(int, input().split())
  edges[a-1].append(b-1)
  edges[b-1].append(a-1)
pp = [0 for _ in range(n)]
for _ in range(q):
  p, x = map(int, input().split())
  pp[p-1] += x
dfs(0, 0)
print(*ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(pow(10, 6))
input = sys.stdin.readline

def dfs(i, d):
  visited[i] = True
  ans[i] = d + pp[i]
  for j in edges[i]:
    if not visited[j]:
      dfs(j, d + pp[i])

n, q = map(int, input().split())
ans = [0 for _ in range(n)]
visited = [False for _ in range(n)]
edges = [[] for _ in range(n)]
for _ in range(n-1):
  a, b = map(int, input().split())
  edges[a-1].append(b-1)
  edges[b-1].append(a-1)
pp = [0 for _ in range(n)]
for _ in range(q):
  p, x = map(int, input().split())
  pp[p-1] += x
dfs(0, 0)
print(*ans)
# coding: utf-8
# Your code here!
k = int(input())

count = 0
ans = []
minN = 10**15

for i in reversed(range(10)):
    for j in reversed(range(1,10**5)):
        num = str(j)+"9"*i
        n = sum([int(k) for k in num])
        n = int(num)/n
        if(minN > n or n==1):
            minN = n
            ans.append(num)

print(len(ans[0]),len(ans))
for i in list(reversed(ans))[:k]:
    print(i)

### FIXED CODE ###

# coding: utf-8
# Your code here!

x = input()

ans = 0
for i in x:
    if(i=="+"):
        ans+=1
    elif(i=="-"):
        ans-=1
        

print(ans)
#coding:utf-8

r =int(input())
pi =3.141592653589793238462
print("{0:.5f} {1:.5f}".format(r**2*pi,r*2*pi))
    

### FIXED CODE ###

#coding:utf-8
import math

r = float(input())
pi =math.pi
men = (r**2)*pi
syu = 2*r*pi

print("{0:.5f} {1:.5f}".format(men,syu))