7
576460752303423487 2
82 9
101 104
10 21
31 10
0 1
10 30
 1
128817972817282999 327672410994637530
 66
7 0
5 7
1 3
3 2
3 5
0 6
1 2
0 7
4 5
4 7
5 1
2 0
4 0
0 5
3 6
7 3
6 0
5 2
6 6
1 7
5 6
2 2
3 4
2 1
5 3
4 6
6 2
3 3
100000000000 1000000000000000000
0 1
4 1
2 6
5 5
4 3
0 3
3 7
3 1
1 0
4 4
1000000000000000000 100000000000
7 6
4 2
7 5
1 6
6 1
2 7
7 7
6 7
2 4
0 2
2 5
7 2
0 0
5 0
5 4
7 4
6 4
0 4
1 1
6 5
1 4
2 3
1 5
7 1
6 3
3 0
 1
100000000000 100000000001
 1
23917 1000000000000000000

First
Second
Second
First
Second
Second
First
 First
 Second
Second
First
Second
First
Second
First
Second
Second
First
First
Second
Second
Second
First
First
Second
First
First
First
Second
First
Second
First
First
Second
First
First
First
Second
First
First
First
Second
Second
First
First
Second
First
First
Second
First
Second
First
First
First
First
Second
First
Second
First
First
Second
Second
Second
First
Second
Second
First
Second
First
Second
First
First
First
Second
 Second
 Second


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Tibor
 */
public class test {

    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(
            new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);

//    static {
//        in.ordinaryChars('-', '-');
//        in.ordinaryChars('+', '+');
//        in.wordChars('-', '-');
//        in.wordChars('+', '+');
//    }
    static int nextInt() {
        try {
            in.nextToken();
        } catch (IOException ex) {
            Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
        }
        return (int) in.nval;
    }

    static String nextString() {
        try {
            in.nextToken();
        } catch (IOException ex) {
            Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
        }
        return in.sval;
    }

    public static void main(String args[]) throws Exception {
        int t = nextInt();

        TreeMap<String, Boolean> m = new TreeMap<String, Boolean>();

        for (int i = 0; i < t; i++) {
            int a = nextInt();
            int b = nextInt();
            if (lep(a, b, m)) {
                System.out.println("First");
            } else {
                System.out.println("Second");
            }
        }

    }

    static boolean lep(int a, int b, TreeMap<String, Boolean> m) {
        String k = a + "_" + b;
        if (m.containsKey(k)) {
            return m.get(k);
        }
        if (a <= b) {
            m.put(k, lep1(a, b, m));
        } else {
            m.put(k, lep2(a, b, m));
        }
        return m.get(k);
    }

    static boolean lep1(int a, int b, TreeMap<String, Boolean> m) {
        String k = a + "_" + b;
        if (m.containsKey(k)) {
            return m.get(k);
        }
        if (a == 0 || a > b) {
            m.put(k, false);
            return false;
        }
        if (lep(a, b % a, m)) {
            m.put(k, true);
            return true;
        }
        int a2 = a;
        while (a2 < b) {
            if (lep(a, b - a2, m)) {
                m.put(k, true);
                return true;
            }
            a2 *= a;
        }
        m.put(k, false);
        return false;
    }

    static boolean lep2(int a, int b, TreeMap<String, Boolean> m) {
        String k = a + "_" + b;
        if (m.containsKey(k)) {
            return m.get(k);
        }
        if (b == 0 || b > a) {
            m.put(k, true);
            return true;
        }
        if (!lep(a % b, b, m)) {
            m.put(k, false);
            return false;
        }
        int b2 = b;
        while (a > b2) {
            if (!lep(a - b2, b, m)) {
                m.put(k, false);
                return false;
            }
            b2 *= b;
        }
        m.put(k, true);
        return true;
    }
}