int input for in range int input if 14 elif elif print -a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n = int(input())
a = [0,0]
b = [0,0]
for i in range(n):
x = int(input())
if x%14 == 0: a[0] += 1
elif x%2 == 0: b[1] += 1
elif x%7 == 0: b[0] += 1
a[1] += 1
print(a[0]*a[1]+b[0]*b[1]-a[0])