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.*;
import java.math.BigInteger;
import java.util.*;

public class C
{
    private final static int oo = 1000000000;
    private final static int MOD = 1000000000 + 9;

    public static void main(String[] strings) throws IOException
    {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(System.out);

        int tc = Integer.parseInt(reader.readLine());

        while(tc-- > 0)
        {
            StringTokenizer tokenizer = new StringTokenizer(reader.readLine());
            long a = Long.parseLong(tokenizer.nextToken());
            long b = Long.parseLong(tokenizer.nextToken());

            writer.println(rec(a, b) == 0 ? "Second" : "First");
            writer.flush();
        }

        writer.flush();
        writer.close();
    }

    private static int rec(long a, long b)
    {
        if (b < a)
        {
            return rec(b, a);
        }

        if(a == 0)
            return 0;
        if(a == 1)
            return 1;


        long nb = b%a;
        long diff = b - nb;
        long sum = 0;
        long first = (diff/a)%a;

        ArrayList<Long> digits = new ArrayList<Long>();

        while(diff > 0)
        {
            long d = diff%a;
            digits.add(d);
            sum += d;
            diff /= a;
        }

        boolean can = false;
        if(sum % 2 == 0)
            can = true;
        if(a%2 == 0)
        {
            if(first%2 == 0)
                can = true;
            else
            {
                for (int i = 2; i < digits.size(); i++)
                    if (digits.get(i) % 2 != 0)
                        can = true;
            }
        }

        if(can)
            return 1;

        return 1-rec(a, b%a);
    }
}