import java.util.Scanner;

public class LeapYearCUI 
{  public static void main(String[] args)
   {  Scanner kbd = new Scanner(System.in);
	  boolean q=false;
	  do
      {  System.out.println("Enter year or type \"q\" to quit.");
         try
         {  int iY = kbd.nextInt();
        	if(LeapYearCalculator.isLeapYear(iY))
       	 	   System.out.println(iY + " is a leap year.");
        	else
               System.out.println(iY + " is not a leap year.");
         }
         catch(Exception InputMismatchException)
         {  if(kbd.next().equalsIgnoreCase("q"))
        	   q = true;
         	else
         	   System.out.println("Improper input.");
         }
	  }while(!q);
}  }