class LeapYear
{
  /**
   * Checks, if the given year is a leap year.
   *
   * @param year  Year to check.
   * @return      {@code true} if {@code year} is a leap year,
   *              {@code false} otherwise.
   */
  static boolean isLeapYear( int year )
  {
    return  (year & 3) == 0  &&
          ( year % 100 != 0 || year % 400 == 0 );
  }

  public static void main( String[] args )
  {
    System.out.println( isLeapYear( 2000 ) );
  }
}
