#[allow(unused_imports)] use std::cmp::{min,max}; #[allow(unused_imports)] use std::collections::BTreeMap; #[allow(unused_imports)] use std::ops::*; #[allow(unused_imports)] use std::collections::BinaryHeap; #[allow(unused_macros)] macro_rules! tf { ($c:expr, $t:expr, $f:expr) => {{ if $c { $t } else { $f } }}; } fn is_prime(x: i64) -> bool { if x == 1 { return false; } for i in 2.. { if i * i > x { break; } if x % i == 0 { return false; } } true } fn main() { let (y,x) = { let xs = read_vec_i64(); (xs[0], xs[1]) }; if is_prime(y) && is_prime(x) { println!("Second"); return; } let y2 = { let mut res = y; for i in y+1.. { if is_prime(i) { res = i; break; } } res }; let x2 = { let mut res = x; for i in x+1.. { if is_prime(i) { res = i; break; } } res }; println!("{}", tf!(((y2-y)+(x2-x)) % 2 != 0, "First", "Second")); } #[allow(dead_code)] fn read_line() -> String { let mut ret = String::new(); std::io::stdin().read_line(&mut ret).ok(); ret.pop(); return ret; } #[allow(dead_code)] fn read_i64() -> i64 { let ss = read_line(); return ss.parse::().unwrap(); } #[allow(dead_code)] fn read_vec_i64() -> Vec { let mut res = vec![]; let ss = read_line(); for ts in ss.split_whitespace() { let x = ts.parse::().unwrap(); res.push(x); } return res; } use std::fmt::Display; #[allow(dead_code)] fn write_vec(xs: &Vec) { if xs.len() == 0 { println!(""); return; } print!("{}", xs[0]); for i in 1..xs.len() { print!(" {}", xs[i]); } println!(""); }