
year=int(input())

if (year%4==0 and year%100 != 0) or (year%4==0 and year%400==0):
    print("1")
else:
    print("0")

2d3a83010c4fbc19834191c227e95bdc594d606f
<mask token>

<mask token>
if year % 4 == 0 and year % 100 != 0 or year % 4 == 0 and year % 400 == 0:
    print('1')
else:
    print('0')

year = int(input())
if year % 4 == 0 and year % 100 != 0 or year % 4 == 0 and year % 400 == 0:
    print('1')
else:
    print('0')


year=int(input())

if (year%4==0 and year%100 != 0) or (year%4==0 and year%400==0):
    print("1")
else:
    print("0")
