Three Way Communication

#Shows correct output in termial but shows wrong answer on codechef…
from math import sqrt
t = int(raw_input())
num = []
for i in range(0,t):
r = int(raw_input())
x1,y1 = map(int,raw_input().split())
x2,y2 = map(int,raw_input().split())
x3,y3 = map(int,raw_input().split())
if sqrt((x2-x1)**2 + (y2-x2)**2) <= r and sqrt((x3-x1)**2 + (y3-y1)**2) <= r:
num.append(‘yes’)
elif sqrt((x3-x1)**2 + (y3-y1)**2) <= r and sqrt((x2-x3)**2 + (y2-y3)**2) <= r:
num.append(‘yes’)
elif sqrt((x2-x3)**2 + (y2-y3)**2) <= r and sqrt((x2-x1)**2 + (y2-x2)**2) <= r:
num.append(‘yes’)
else:
num.append(‘no’)
for i in num:
print i

** are missing in the preview in if statements

Just replace y2-x2 with y2-y1 in your code and you will get AC.