import os
import sys
# 请在此输入您的代码
n = int(input())
man = []
for _ in range(n):
x, y = map(int, input().split())
man.append([x, y])
D = int(input())
man_used = [0 for _ in range(n)]
def dfs(index):
man_used[index] = 1
for i in range(n):
if not man_used[i]:
r_ = (man[i][0] - man[index][0]) ** 2 + (man[i][1] - man[index][1]) ** 2
if r_ <= D * D:
dfs(i)
dfs(0)
for i in man_used:
if i:
print(1)
else:print(0)