years=int(input())
if (years % 4 == 0 and years % 100 != 0) or (years % 400 == 0):
print (years,"- высокосный год")
if (years % 100 > 0):
century = years // 100 + 1
else:
century = years // 100
print(century,"век")
years=int(input())
if (years % 4 == 0 and years % 100 != 0) or (years % 400 == 0):
print (years,"- высокосный год")
if (years % 100 > 0):
century = years // 100 + 1
else:
century = years // 100
print(century,"век")