for _ in range(int(input())):
c=0
a,b,a1,b1,a2,b2 = map(int,input().split())
l = [(a,b),(a1,b1),(a2,b2)]
if (l[0][0] in l[1] and l[0][1] in l[1]):
print(1)
elif (l[0][0] in l[2] and l[0][1] in l[2]):
print(2)
else:
print(0)
10 10 10 20 20 30 30 0 50 70 80 90 100 100 0 20 20 20 20 20 20 1 20 2 2 20 30 2 1
t=int(input())
l=[]
s=set()
while(t>0):
for i in range(0,4):
i=int(input())
s.add(i)
l.append(i)
#print(len(s))
if(len(s)==4):
print("2")
elif(len(s)==1):
print("0")
elif(len(s)==3):
print("1")
elif(len(s)==2):
b=0
c=l[0]
for i in range(0,3):
if(c==l[i+1]):
b=b+1
#print(b)
if(b==1):
print("2")
else:
print("1")
s.clear()
l.clear()
t=t-1
1 2 3 4 5 2
import datetime
# date in yyyy/mm/dd format
d1 = datetime.datetime(2018, 5, 3)
d2 = datetime.datetime(2018, 6, 1)
# Comparing the dates will return
# either True or False
print("d1 is greater than d2 : ", d1 > d2)
print("d1 is less than d2 : ", d1 < d2)
print("d1 is equal to d2 : ", d1 == d2)
d1 is greater than d2 : False d1 is less than d2 : True d1 is equal to d2 : False
class Distance:
def GetDistance(self):
self.__m=int(input("Enter M: "))
self.__km = int(input("Enter KM: "))
def PutDistance(self):
print(self.__km,self.__m)
def __add__(self, T):
R=Distance()
R.__m=self.__m+T.__m
R.__km = self.__km + T.__km
R.__km=R.__km+(R.__m//1000)
R.__m=R.__m%1000
return R
D1=Distance()
D2=Distance()
print("Enter first distance")
D1.GetDistance()
print("Enter second distance")
D2.GetDistance()
D3=D1+D2
print("The sum of both distance is")
D3.PutDistance()
Enter first distance Enter M: 900 Enter KM: 5 Enter second distance Enter M: 450 Enter KM: 3 The sum of both distance is 9 350