Problem:
Score : 1000 points

Problem Statement

There are N integers written on a blackboard. The i-th integer is A_i, and the greatest common divisor of these integers is 1.

Takahashi and Aoki will play a game using these integers. In this game, starting from Takahashi the two player alternately perform the following operation:

Select one integer on the blackboard that is not less than 2, and subtract 1 from the integer.

Then, divide all the integers on the black board by g, where g is the greatest common divisor of the integers written on the blackboard.

The player who is left with only 1s on the blackboard and thus cannot perform the operation, loses the game.
Assuming that both players play optimally, determine the winner of the game.

Constraints

1 ≦ N ≦ 10^5

1 ≦ A_i ≦ 10^9

The greatest common divisor of the integers from A_1 through A_N is 1.

Input

The input is given from Standard Input in the following format:

N
A_1 A_2 … A_N

Output

If Takahashi will win, print First. If Aoki will win, print Second.

Sample Input 1

3
3 6 7

Sample Output 1

First

Takahashi, the first player, can win as follows:

Takahashi subtracts 1 from 7. Then, the integers become: (1,2,2).

Aoki subtracts 1 from 2. Then, the integers become: (1,1,2).

Takahashi subtracts 1 from 2. Then, the integers become: (1,1,1).

Sample Input 2

4
1 2 4 8

Sample Output 2

First

Sample Input 3

5
7 8 8 8 8

Sample Output 3

Second

Solution in Rust (1.15.1) (judge verdict: Runtime Error)

// use std::ops::{Index, IndexMut};
// use std::cmp::{Ordering, min, max};
// use std::collections::{BinaryHeap, BTreeMap};
// use std::collections::btree_map::Entry::{Occupied, Vacant};
// use std::clone::Clone;

fn getline() -> String {
    let mut res = String::new();
    std::io::stdin().read_line(&mut res).ok();
    res
}

macro_rules! readl {
    ($t: ty) => {
        {
            let s = getline();
            s.trim().parse::<$t>().unwrap()
        }
    };
    ($( $t: ty),+ ) => {
        {
            let s = getline();
            let mut iter = s.trim().split(' ');
            ($(iter.next().unwrap().parse::<$t>().unwrap(),)*)
        }
    };
}

macro_rules! readlvec {
    ($t: ty) => {
        {
            let s = getline();
            let iter = s.trim().split(' ');
            iter.map(|x| x.parse().unwrap()).collect::<Vec<$t>>()
        }
    }
}

macro_rules! debug {
    ($x: expr) => {
        println!("{}: {:?}", stringify!($x), $x)
    }
}

fn printiter<'a, T>(v: &'a T)
where
    &'a T: std::iter::IntoIterator,
    <&'a T as std::iter::IntoIterator>::Item: std::fmt::Display,
{
    for (i, e) in v.into_iter().enumerate() {
        if i != 0 {
            print!(" ");
        }
        print!("{}", e);
    }
    println!("");
}

struct ContestPrinter {
    s: String,
}

impl ContestPrinter {
    fn new() -> ContestPrinter {
        ContestPrinter { s: String::new() }
    }

    fn print<T>(&mut self, x: T)
    where
        T: std::fmt::Display,
    {
        self.s.push_str(format!("{}", x).as_str());
    }

    fn println<T>(&mut self, x: T)
    where
        T: std::fmt::Display,
    {
        self.s.push_str(format!("{}\n", x).as_str());
    }
}

macro_rules! make_modint {
    ($MOD: expr, $name: ident) => {
        #[derive(Ord, Hash, Eq, PartialOrd, PartialEq)]
        struct $name {
            val: i64,
        }

        impl $name {
            fn new(x: i64) -> $name {
                let x = x%$MOD;
                $name{val: if x < 0 { x+$MOD } else { x }}
            }

            fn pow(&self, x: i64) -> $name {
                let mut res = $name::new(1);
                let mut tmp = x;
                let mut p = *self;
                while tmp != 0 {
                    if tmp&1 == 1 {
                        res *= p;
                    }
                    tmp = tmp>>1;
                    p = p*p;
                }
                res
            }

            fn inv(&self) -> $name {
                assert!(self.val != 0);
                let mut a = self.val;
                let mut b = $MOD;
                let mut u = 1;
                let mut v = 0;
                use std::mem::swap;
                while b != 0 {
                    let t = a/b;
                    a -= t*b;
                    swap(&mut a, &mut b);
                    u -= t*v;
                    swap(&mut u, &mut v);
                }
                $name::new(u)
            }
        }

        impl std::clone::Clone for $name {
            fn clone(&self) -> $name {
                $name{ val: self.val }
            }
        }

        impl std::marker::Copy for $name { }

        impl std::ops::Add for $name {
            type Output = $name;
            fn add(self, y: $name) -> $name {
                let tmp = self.val+y.val;
                $name{val: if tmp >= $MOD {tmp-$MOD} else {tmp}}
            }
        }

        impl std::ops::Neg for $name {
            type Output = $name;
            fn neg(self) -> $name {
                $name::new(self.val)
            }
        }

        impl std::ops::Sub for $name {
            type Output = $name;
            fn sub(self, other: $name) -> $name{
                let tmp = self.val-other.val;
                $name{val: if tmp < 0 {tmp+$MOD} else {tmp}}
            }
        }

        impl std::ops::Mul for $name {
            type Output = $name;
            fn mul(self, y: $name) -> $name {
                $name{val: (self.val*y.val)%$MOD}
            }
        }

        impl std::ops::Div for $name {
            type Output = $name;
            fn div(self, other: $name) -> $name {
                self*other.inv()
            }
        }

        impl std::fmt::Display for $name {
            fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
                write!(f, "{}", self.val)
            }
        }

        impl std::ops::AddAssign for $name {
        fn add_assign(&mut self, other: $name) {
            *self = *self+other;
        }
        }

        impl std::ops::SubAssign for $name {
            fn sub_assign(&mut self, other: $name) {
                *self = *self-other;
            }
        }

        impl std::ops::MulAssign for $name {
            fn mul_assign(&mut self, other: $name) {
                *self = *self*other;
            }
        }

        impl std::ops::DivAssign for $name {
            fn div_assign(&mut self, other: $name) {
                *self = *self*other.inv();
            }
        }

        impl std::fmt::Debug for $name {
            fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
                write!(f, "{}", self.val)
            }
        }
    }
}

make_modint!(1_000_000_000 + 7, ModInt);

fn mint(x: i64) -> ModInt {
    ModInt::new(x)
}

mod algebra {
    use std::ops::{Add, Div, Mul, Neg, Sub};
    use std;

    pub trait Zero {
        fn Zero() -> Self;
    }

    pub trait Monoid: Add<Self, Output = Self> + Zero
    where
        Self: std::marker::Sized,
    {
}

    pub trait Group: Monoid + Neg + Sub<Self, Output = Self> {}

    pub trait Ring: Group + One + Mul<Self, Output = Self> {}

    pub trait One {
        fn One() -> Self;
    }

    pub trait Field: Ring + Div<Self, Output = Self> {}
}

impl std::ops::Drop for ContestPrinter {
    fn drop(&mut self) {
        print!("{}", self.s);
    }
}

// #[derive(Debug, Eq, PartialEq)]
// struct LagrangePolynomial<T>
// where
//     T: std::hash::Hash + std::fmt::Debug + Eq + PartialEq,
// {
//     c: Vec<T>,
//     values: Vec<(T, T)>,
// }

// impl<T> LagrangePolynomial<T>
// where
//     T: algebra::Field + std::clone::Clone + Eq + std::fmt::Debug + std::hash::Hash,
// {
//     fn new(values: Vec<(T, T)>) -> Self {
//         let c = values
//             .iter()
//             .map(|&(ref x, ref y)| {
//                 let mul = values.iter().fold(T::One(), |mul, &(ref t, _)| {
//                     if t != x {
//                         mul * (x.clone() - t.clone())
//                     } else {
//                         mul
//                     }
//                 });
//                 y.clone() / mul
//             })
//             .collect();
//         LagrangePolynomial {
//             c: c,
//             values: values,
//         }
//     }

//     fn calc(&self, x: T) -> T {
//         let mut get = None;
//         for &(ref k, ref v) in &self.values {
//             if *k == x {
//                 get = Some(v);
//             }
//         }
//         if let Some(v) = get {
//             v.clone()
//         } else {
//             let mul = self.values
//                 .iter()
//                 .fold(T::One(), |mul, &(ref a, _)| mul * (x.clone() - a.clone()));

//             self.c
//                 .iter()
//                 .zip(self.values.iter().map(|&(ref a, _)| a))
//                 .fold(T::Zero(), |sum, (c, a)| {
//                     sum + c.clone() * mul.clone() / (x.clone() - a.clone())
//                 })
//         }
//     }
// }

// impl LagrangePolynomial<ModInt> {
//     fn fast_new(values: Vec<ModInt>) -> Self {
//         use algebra::*;
//         let n = values.len();
//         let values: Vec<_> = (0..n)
//             .map(|x| ModInt::new(x as i64))
//             .zip(values.into_iter())
//             .collect();
//         let mut c = Vec::with_capacity(values.len());
//         let mut mul = (1..n)
//             .map(|x| ModInt::new(-(x as i64)))
//             .fold(ModInt::One(), |mul, x| mul * x);
//         for &(x, y) in &values {
//             c.push(y.clone() / mul);
//             if x.val != n as i64 - 1 {
//                 mul = mul * (x + ModInt::new(1)) / (ModInt::new(-(n as i64) + 1) + x);
//             }
//         }
//         LagrangePolynomial {
//             values: values,
//             c: c,
//         }
//     }
// }


impl algebra::One for ModInt {
    // const ONE: ModInt = ModInt { val: 1 };
    fn One() -> Self {
        ModInt { val: 1 }
    }
}

impl algebra::Zero for ModInt {
    fn Zero() -> Self {
        ModInt { val: 0 }
    }
}

impl algebra::Monoid for ModInt {}

impl algebra::Group for ModInt {}

impl algebra::Ring for ModInt {}

impl algebra::Field for ModInt {}

#[derive(Debug, Eq, PartialEq)]
struct LagrangePolynomial<T>
where
    T: std::hash::Hash + std::fmt::Debug + Eq + PartialEq,
{
    c: Vec<T>,
    values: Vec<(T, T)>,
}

impl<T> LagrangePolynomial<T>
where
    T: algebra::Field + std::clone::Clone + Eq + std::fmt::Debug + std::hash::Hash,
{
    fn new(values: Vec<(T, T)>) -> Self {
        let c = values
            .iter()
            .map(|&(ref x, ref y)| {
                let mul = values.iter().fold(T::One(), |mul, &(ref t, _)| {
                    if t != x {
                        mul * (x.clone() - t.clone())
                    } else {
                        mul
                    }
                });
                y.clone() / mul
            })
            .collect();
        LagrangePolynomial {
            c: c,
            values: values,
        }
    }

    fn calc(&self, x: T) -> T {
        let mut get = None;
        for &(ref k, ref v) in &self.values {
            if *k == x {
                get = Some(v);
            }
        }
        if let Some(v) = get {
            v.clone()
        } else {
            let mul = self.values
                .iter()
                .fold(T::One(), |mul, &(ref a, _)| mul * (x.clone() - a.clone()));

            self.c
                .iter()
                .zip(self.values.iter().map(|&(ref a, _)| a))
                .fold(T::Zero(), |sum, (c, a)| {
                    sum + c.clone() * mul.clone() / (x.clone() - a.clone())
                })
        }
    }
}

impl LagrangePolynomial<ModInt> {
    fn fast_new(values: Vec<ModInt>) -> Self {
        use algebra::*;
        let n = values.len();
        let values: Vec<_> = (0..n)
            .map(|x| ModInt::new(x as i64))
            .zip(values.into_iter())
            .collect();
        // let mut c = Vec::with_capacity(values.len());
        let mut mul = (1..n)
            .map(|x| ModInt::new(-(x as i64)))
            .fold(ModInt::One(), |mul, x| mul * x);
        let c: Vec<_> = values.iter().scan(mul, |mul, &(x, y)| {
            let ret = y.clone() / *mul;
            if x.val != n as i64 - 1 {
                *mul = *mul * (x + ModInt::new(1)) / (ModInt::new(-(n as i64) + 1) + x);
            }
            Some(ret)
        }).collect();
        // for &(x, y) in &values {
        //     c.push(y.clone() / mul);
        //     if x.val != n as i64 - 1 {
        //         mul = mul * (x + ModInt::new(1)) / (ModInt::new(-(n as i64) + 1) + x);
        //     }
        // }
        LagrangePolynomial {
            values: values,
            c: c,
        }
    }
}

fn main() {
    let mut printer = ContestPrinter::new();
    let _ = readl!(usize);
    let a: Vec<_> = readlvec!(i64).into_iter().map(|x| mint(x)).collect();
    let t = mint(readl!(i64));
    let poly = LagrangePolynomial::fast_new(a);
    printer.println(poly.calc(t));
}