#![allow(non_snake_case, unused_imports)] use std::cmp::{min, max}; use std::collections::{BinaryHeap, Bound, HashMap, HashSet, VecDeque}; use std::hash::Hash; use std::ops::RangeBounds; use ac_library::{Additive, Min, Segtree}; use proconio::{input, marker::Usize1, marker::Chars}; use itertools::Itertools; #[allow(unused_macros)] macro_rules! d { ( $( $x:expr ),* $(,)? ) => { eprintln!( concat!( $( stringify!($x), "={:?} " ),* ), $( $x ),* ); }; } #[allow(dead_code)] fn yn(b: bool) -> &'static str { if b { "Yes" } else { "No" } } fn is_prime(n: i64) -> bool { if n <= 1 { return false } if n == 2 { return true } if n % 2 == 0 { return false } let mut i = 3; while i * i <= n { if n % i == 0 { return false } i += 2; } true } fn main() { input! { M: i64, D: i64, } let x = M * 100 + D; println!("{}", yn(is_prime(x))); }