Write the logic of a program to find whether a given year is a leap year or not.
Implement the function using the Gregorian calendar rules. Return True if the year is a leap year and False otherwise. A year is leap if it is divisible by 400, or divisible by 4 but not by 100.
def is_leap_year(year):