import java.util.Scanner;

public class Demo {

  /**
    * 判断输入的年份是否为闰年 判断是否是闰年的条件: 1. 能被400整除 2.能被4整除但不能被100整除 两者符合其一即可
    */

  public static void main(String[] args) {
    System.out.println("请输入正确年份");
    Scanner input = new Scanner(System.in);
    // 获取输入的字符串
    String str = input.nextLine();
    System.out.println("\n");
    if (str.length() == 4) {
      // 将字符串转换为整型
      int year = Integer.parseInt(str);
      // 判断符合闰年的条件
      boolean b1 = (year % 400 == 0);
      boolean b2 = (year % 4 == 0) && (year % 100 != 0);
      //运用条件运算符b1||b2值为真返回“是闰年”否则返回“不是闰年”
      String output = (b1||b2)?"是闰年":"不是闰年";
      System.out.println(year+output);
    }else {
      System.out.println("请输入正确的年份");
    }

  }

}