if(!isNum(temp)){
System.out.println("the year you input is not valid");
}else{
year=Integer.parseInt(temp);
if(year<1980||year>2050){
System.out.println("the year you input is not in the scale");
System.exit(1);
}else if((year%4==0&&year%100!=0)||year%400==0){
System.out.println(year+" is a leap year");
}else{
System.out.println(year+" is not a leap year");
}
}
}