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.*;
import static java.lang.Math.*;

public class CF114_C implements Runnable {
	
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	
	@Override
	public void run() {
		try {
			long startTime = System.currentTimeMillis();
			if (ONLINE_JUDGE) {
				in = new BufferedReader(new InputStreamReader(System.in));
				out = new PrintWriter(System.out);
			} else {
				in = new BufferedReader(new FileReader("input.txt"));
				out = new PrintWriter("output.txt");
			}
			tok = new StringTokenizer("");
			Locale.setDefault(Locale.US);
			solve();
			in.close();
			out.close();
			long endTime = System.currentTimeMillis();
			long totalMemory = Runtime.getRuntime().totalMemory();
			long freeMemory = Runtime.getRuntime().freeMemory();
			System.err.println("Time = " + (endTime - startTime) + " ms");
			System.err.println("Memory = " + ((totalMemory - freeMemory) / 1024) + " KB");
		} catch (Throwable e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}
	
	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}
	
	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}
	
	long readLong() throws IOException {
		return Long.parseLong(readString());
	}
	
	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}
	
	void debug(Object... o) {
		if (!ONLINE_JUDGE) {
			System.err.println(Arrays.deepToString(o));
		}
	}
	
	public static void main(String[] args) {
		new Thread(null, new CF114_C(), "", 256 * 1024 * 1024).start();
	}

	static class Utils {

		private Utils() {}

		public static void mergeSort(int[] a) {
			mergeSort(a, 0, a.length - 1);
		}

		private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
			final int MAGIC_VALUE = 50;
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergeSort(a, leftIndex, middleIndex);
					mergeSort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			int[] leftArray = new int[length1];
			int[] rightArray = new int[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
				}
			}
		}

		private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				int current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}

	}
	
//------------------------------------------------------------------------------
	
	class Pair {
		long a, b;

		public Pair(long a, long b) {
			super();
			this.a = a;
			this.b = b;
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + getOuterType().hashCode();
			result = prime * result + (int) (a ^ (a >>> 32));
			result = prime * result + (int) (b ^ (b >>> 32));
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Pair other = (Pair) obj;
			if (!getOuterType().equals(other.getOuterType()))
				return false;
			if (a != other.a)
				return false;
			if (b != other.b)
				return false;
			return true;
		}

		private CF114_C getOuterType() {
			return CF114_C.this;
		}

		@Override
		public String toString() {
			return String.format("(%d %d)", a, b);
		}
		
	}
	
	Map<Pair, Boolean> map = new HashMap<Pair, Boolean>();

	private boolean solveStupid(long a, long b) {
		if (a > b) { long t = a; a = b; b = t; }
		if (a == 0) return false;
		if (a == 1) return true;
		Pair pair = new Pair(a, b);
		if (map.containsKey(pair)) {
			return map.get(pair);
		}
		List<Long> toSubstract = new ArrayList<Long>();
		long aa = a;
		while (true) {
			if (aa > b) {
				break;
			}
			toSubstract.add(aa);
			aa *= a;
		}
		toSubstract.add(b / a * a);
		boolean res = false;
		for (long c : toSubstract) {
			long nextB = b - c;
			if (!solveStupid(a, nextB)) {
				res = true;
				break;
			}
		}
		map.put(pair, res);
		return res;
	}
	
	void go() {
		for (long a = 1; a <= 50; a++) {
			for (long b = a; b <= 100; b++) {
				int res = solveStupid(a, b) ? 1 : 0;
				int res2 = solveTest(a, b) ? 1 : 0;
				if (res != res2) {
					debug(a, b);
				}
				out.print(res);
				if (b % a ==0) out.print(" ");
			}
			out.println();
		}
	}
	
	void solve() throws IOException {
		//go(); if (true) return;
		
		int tests = readInt();
		for (int test = 1; test <= tests; test++) {
			long a = readLong();
			long b = readLong();
			boolean res = solveTest(a, b);
			if (res) {
				out.println("First");
			} else {
				out.println("Second");
			}
		}
	}

	// true if 1st wins
	private boolean solveTest(long a, long b) {
		if (a > b) return solveTest(b, a);
		if (a == 0) return false;
		if (a == 1) return true;
		if (a == b) return true;
		if (b % a == 0) return true;
		if (a % 2 != 0) {
			long dSmall = b / a;
			if (dSmall % 2 == 0) {
				return true;
			}
		} else {
			long dSmall = b / a;
			long dBig = b / a / (a + 1);
			if (dBig % 2 == 0) {
				if (dSmall % 2 == 0) {
					return true;
				}
			} else {
				if (dSmall % 2 != 0) {
					return true;
				}
			}
		}
		return !solveTest(a, b%a);
	}
	
}
