s = []
count = 0
for i in range(7525,13487):
if i % 7 == 0 and i % 6 and 9 and 14 and 21 != 0:
s.append(i)
count += 1
s.sort()
print(count,s[0])
s = []
count = 0
for i in range(7525,13487):
if i % 7 == 0 and i % 6 and 9 and 14 and 21 != 0:
s.append(i)
count += 1
s.sort()
print(count,s[0])