#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
const long double EPS = 1E-9;
const long double PI = 3.1415926535897932384626433832795;
bool solve(long long a, long long b) {
  if (min(a, b) == 0) return false;
  if (a > b) return solve(b, a);
  if (!solve(b % a, a)) return true;
  b = (b / a) - 1;
  if (a % 2 == 1) {
    if (b % 2 == 1) return true;
    return false;
  } else {
    if ((b % (a + 1)) % 2 == 1 || (b % (a + 1)) == a) return true;
    return false;
  }
}
int main() {
  int tests;
  cin >> tests;
  for (int test = 0; test < (int)(tests); test++) {
    long long a, b;
    cin >> a >> b;
    if (solve(a, b))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
