require 'prime' def yarudake(y, x, t = 0) return true if t > 0 && ((y).prime? || (x).prime?) #return false if (y+1).prime? && (x+1).prime? return true if !yarudake(y+1, x, 1) return true if !yarudake(y, x+1, 1) return false end def solve(y, x) return false if y == 2 || x == 2 ty = tx = 0 while ty == 0 || !y.prime? ty += 1 y += 1 end while tx == 0 || !x.prime? tx += 1 x += 1 end p [ty, tx] return (ty+tx-2).even? ? false : true end y,x = gets.split.map(&:to_i) puts solve(y, x) ? "First" : "Second" #puts yarudake(y, x) ? "First" : "Second"