def is_leap_year(year):
    if year <= 1582:
        return "年份必须大于1582年"
    if (year % 400 == 0) or (year % 100 != 0 and year % 4 == 0):
        return f"{year}年是闰年"
    else:
        return f"{year}年不是闰年"

year = int(input())
print(is_leap_year(year))