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.util.*;

public class Main {
//	static Scanner in; static int next() throws Exception {return in.nextInt();};
//	static StreamTokenizer in; static int next() throws Exception {in.nextToken(); return (int) in.nval;}
	static BufferedReader in;
	static PrintWriter out;
	static int n = 1000;
	static boolean[][] win = new boolean[n][n];

	static HashMap<String, Integer> map;

	static boolean go(long a, long b) {
//		System.out.println(a + " " + b);
		//if (a < n && b < n) return win[(int)a][(int)b];
		if (a == 0 || b == 0) return false;
		
		if (a > b) {
			long temp = a;
			a = b;
			b = temp;
		}

		long c = b % a;

		boolean w1 = go(c, a);
		if (!w1) return true;
		
		long d = b/a;

		if (a % 2 == 1) return d % 2 == 0;

		long e = d % (a + 1);
		return e % 2 == 0;
	}

	static long gcd(long a, long b) {return a > b ? gcd(b, a) : a == 0 ? b : gcd(b % a, a);}

	static int rand() {return (int)(Math.random() * 1e9);}

	public static void main(String[] args) throws Exception {
//		in = new Scanner(System.in);
//		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		

/*		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) if (i != 0 || j != 0) if (!win[i][j]) {
				if (i < j) for (int t = i + j; t < n; t += j) win[t][j] = true;
				else for (int t = i + j; t < n; t += i) win[i][t] = true;

				if (j > 1) for (int t = j; i + t < n; t *= j) win[i + t][j] = true;
				else if (j > 0 && i + j < n) win[i + j][j] = true;
				if (i > 1) for (int t = i; j + t < n; t *= i) win[i][j + t] = true;
				else if (i > 0 && i + j < n) win[i][j + i] = true;
			}
	   	}*/

/*	   	for (int i = 0; i < 50; i++) {
	   		for (int j = 0; j < 50; j++) out.print(win[i][j] ? "1 " : "0 ");
	   		out.println();
	   	}
	   	int count = 0;
	   	for (int i = 1; i < n; i++) for (int j = 1; j < n; j++) if (!win[i][j]) count++;
	   	out.println(count);*/

		int tests = Integer.parseInt(in.readLine());
		for (int test = 0; test < tests; test++) {
			map = new HashMap<String, Integer>();
			String[] s = in.readLine().split(" ");
			out.println(go(Long.parseLong(s[0]), Long.parseLong(s[1])) ? "First" : "Second");
		}
		
		out.close();
	}
}