import java.util.*; public class Main { public static void main(String[] args) throws Exception { final int input = 3; Scanner in = new Scanner(System.in); int result = 0; List list = new ArrayList<>(); for(int i=0; i N || N > S){ System.out.println("No"); return; } list.add(N); } result = list.get(0)*list.get(1)*list.get(2); System.out.println( isPrime(result) ); } public static String isPrime(int result){ if(result % 3 == 0){ return "Yes"; }else{ return "No"; } } }