n = int(input("n = "))
a, b, c = map(int, input("a, b, c = ").split())
cnt = (a % n == 0)
cnt += (b % n == 0)
cnt += (c % n == 0)
print(str(cnt) + " numbers out of 3 are multiple of " + str(n))
n = int(input("n = "))
a, b, c = map(int, input("a, b, c = ").split())
cnt = (a % n == 0)
cnt += (b % n == 0)
cnt += (c % n == 0)
print(str(cnt) + " numbers out of 3 are multiple of " + str(n))