def days_in_month(year, month):
    """
    Inputs:
      year  - an integer between datetime.MINYEAR and datetime.MAXYEAR
              representing the year
      month - an integer between 1 and 12 representing the month

    Returns:
      The number of days in the input month.
    """
    leapyear=0
    if(year%4 ==0):
        if(year%100!=0):
            leapyear=1
    elif(year%400==0):
        leapyear=1



    if(month == 1 or month == 3 or month == 5 or month == 7 or
    month == 8 or month == 10 or month == 12):
        return 31
    elif(month == 4 or month == 6 or month == 9 or month == 11):
        return 30
    elif(leapyear == 0 and month == 2):
        return 28
    elif(leapyear == 1 and month == 2):
        return 29
    else:
        print("Please Enter a valid month and Year")