Chef appeared for an exam consisting of 3 sections. Each section is worth 100 marks.

Chef scored A marks in Section 1, B marks in section 2, and C marks in section 3.

Chef passes the exam if both of the following conditions satisfy:

Total score of Chef is ≥ 100;
Score of each section ≥ 10.

Determine whether Chef passes the exam or not.

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of a single line containing 3 space-separated numbers A, B, C - Chef's score in each of the sections.

------ Output Format ------ 

For each test case, output PASS if Chef passes the exam, FAIL otherwise.

Note that the output is case-insensitive i.e. PASS, Pass, pAsS, and pass are all considered same.

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$0 ≤ A, B, C ≤ 100$

----- Sample Input 1 ------ 
5
9 100 100
30 40 50
30 20 40
0 98 8
90 80 80

----- Sample Output 1 ------ 
FAIL
PASS
FAIL
FAIL
PASS

----- explanation 1 ------ 
Test Case $1$: Although Chef's total score is $209 ≥ 100$, still Chef fails the exam since his score in section $1$ is $< 10$.

Test Case $2$: Chef cleared each section's cutoff as well his total score $= 120 ≥ 100$.

Test Case $3$: Although Chef cleared each section's cutoff but his total score is $90 < 100$. So he fails the exam.

Test Case $4$: Although Chef's total score is $106 ≥ 100$, still Chef fails the exam since his score in section $1$ is $< 10$.

Test Case $5$: Chef cleared each section's cutoff as well his total score $= 250 ≥ 100$.

Difficulty: EASY

Starter code:

Solutions:
t = int(input())
for i in range(t):
	(n, m, p) = map(int, input().split())
	if n + m + p >= 100 and n >= 10 and (m >= 10) and (p >= 10):
		print('PASS')
	else:
		print('FAIL')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if x >= 10 and y >= 10 and (z >= 10) and (x + y + z >= 100):
		print('PASS')
	else:
		print('FAIL')


test_cases = int(input())
for i in range(test_cases):
	scores = list(map(int, input().split()))
	passed = []
	for j in scores:
		if j >= 10:
			passed.append(True)
		else:
			passed.append(False)
	if sum(scores) >= 100:
		passed.append(True)
	else:
		passed.append(False)
	if all(passed):
		print('PASS')
	else:
		print('FAIL')


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a < 10 or b < 10 or c < 10 or (a + b + c < 100):
		print('FAIL')
	else:
		print('PASS')


T = int(input())
for i in range(T):
	(x, y, z) = input().split()
	A = int(x)
	B = int(y)
	C = int(z)
	score = A + B + C
	if score >= 100 and A >= 10 and (B >= 10) and (C >= 10):
		print('PASS')
	else:
		print('FAIL')


t = int(input())
for i in range(t):
	(a, b, c) = [int(x) for x in input().split()]
	if a + b + c >= 100 and a >= 10 and (b >= 10) and (c >= 10):
		print('PASS')
	else:
		print('FAIL')


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	n = a + b + c
	if a >= 10 and b >= 10 and (c >= 10) and (n >= 100):
		print('PASS')
	else:
		print('FAIL')


T = int(input())
for i in range(T):
	(A, B, C) = map(int, input().split())
	total = A + B + C
	if total >= 100 and (A >= 10 and B >= 10 and (C >= 10)):
		print('PASS')
	else:
		print('FAIL')


n = int(input())
for i in range(0, n):
	(a, b, c) = map(int, input().split(' '))
	if a + b + c >= 100 and a >= 10 and (b >= 10) and (c >= 10):
		print('PASS')
	else:
		print('FAIL')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	if l[0] >= 10 and l[1] >= 10 and (l[2] >= 10) and (l[0] + l[1] + l[2] >= 100):
		print('PASS')
	else:
		print('FAIL')


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = x + y + z
	if a < 100:
		print('FAIL')
	elif x < 10 or y < 10 or z < 10:
		print('FAIL')
	else:
		print('PASS')


t = int(input())
while t != 0:
	(a, b, c) = map(int, input().split())
	s = a + b + c
	if s >= 100 and a >= 10 and (b >= 10) and (c >= 10):
		print('PASS')
	else:
		print('FAIL')
	t = t - 1


t = int(input())
for i in range(t):
	(X, Y, Z) = map(int, input().split())
	if X + Y + Z >= 100 and X >= 10 and (Y >= 10) and (Z >= 10):
		print('PASS')
	else:
		print('FAIL')


T = int(input())
for _ in range(T):
	(x, y, z) = map(int, input().split())
	if x >= 10 and y >= 10 and (z >= 10) and (x + y + z >= 100):
		print('PASS')
	else:
		print('FAIL')


tc = int(input())
for i in range(tc):
	(x, y, z) = map(int, input().split())
	if x + y + z < 100 or min(x, y, z) < 10:
		print('FAIL')
	else:
		print('PASS')


t = int(input())
for i in range(t):
	(A, B, C) = map(int, input().split())
	k = 100
	if A >= 10 and B >= 10 and (C >= 10) and (A + B + C >= k):
		print('PASS')
	else:
		print('FAIL')


n = int(input())
while n > 0:
	(a, b, c) = map(int, input().split())
	d = a + b + c
	if d >= 100 and a >= 10 and (b >= 10) and (c >= 10):
		print('PASS')
	else:
		print('FAIL')
	n -= 1


for i in range(int(input())):
	(j, k, l) = map(int, input().split())
	if j < 10 or k < 10 or l < 10:
		print('FAIL')
	elif j + k + l < 100:
		print('FAIL')
	else:
		print('PASS')


x = int(input())
for i in range(x):
	(S, T, R) = list(map(int, input().split()))
	if S >= 10 and T >= 10 and (R >= 10) and (S + T + R >= 100):
		print('PASS')
	else:
		print('FAIL')