//================================= // Created on: 2018/08/24 21:23:14 //================================= #include #define show(x) std::cerr << #x << " = " << x << std::endl using ll = long long; using ull = unsigned long long; using ld = long double; constexpr ll MOD = 1000000007LL; template constexpr T INF = std::numeric_limits::max() / 10; std::mt19937 mt{std::random_device{}()}; int main() { ll Y, X; std::cin >> Y >> X; auto p = [](const ll n) { if (n == 1) { return false; } for (ll i = 2; i * i <= n; i++) { if (n % i == 0) { return false; } } return true; }; if (p(Y) and p(X)) { return (std::cout << "Second" << std::endl), 0; } bool rev = false; if (p(Y)) { Y++, rev = true; } if (p(X)) { X++, rev = true; } auto rec = [&](auto&& self, const ll y, const ll x, const bool first) { if (p(y) or p(x)) { return std::cout << (not first ? "Second" : "First") << std::endl, (void)(0); } if (not p(y + 1)) { self(self, y + 1, x, not first); } else { self(self, y, x + 1, not first); } }; rec(rec, Y, X, not rev); return 0; }