#!/usr/bin/python
print("Input circle")
l=list(input())
if len(l) != 3:
        print("WRONG INPUT")
	quit()
x0=l[0]
y0=l[1]
r=l[2]

print("Input dots")
dots=list(input())
c=len(dots)
if c % 2:
	print("WRONG INPUT")
	quit()

while len(dots) > 0:
	x=dots.pop()
	y=dots.pop()
	if (x-x0)**2+(y-y0)**2>r**2:
		print("NO")
		quit()

print("YES")

