include "lib_remainder.alc"

Boolean function leap_year(year : Integer):
	// Is a leap year if it is divisible by 4
	if (remainder(year, 4) == 0):
		// Unless it is also divisible by 1000
		if (remainder(year, 1000) == 0):
			return False
		else:
			return True
	else:
		return False

Void function main():
	while (True):
		output(leap_year(input()))
