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

#include <bits/stdc++.h>
using namespace std;
const string fir = "First";
const string sec = "Second";
long long x, y;
long long gcd(long long a, long long b, long long &cnt) {
  cnt++;
  if (b == 0)
    return a;
  else
    return gcd(b, a % b, cnt);
}
void swap(long long &a, long long &b) {
  long long t = a;
  a = b;
  b = t;
}
long long pow(long long a, long long b) {
  long long s = 1;
  for (int i = 1; i <= b; i++) s *= a;
  return s;
}
bool solve(long long x, long long y, bool win) {
  long long k = log(y) / log(x);
  if (2 * x >= y) {
    long long cnt = 0;
    long long c = gcd(y, x, cnt);
    if (cnt % 2 == 0)
      return true;
    else
      return false;
  }
  bool yes = false;
  if (win == 0) yes = true;
  for (int i = k; i >= 1; i--) {
    long long a = x;
    long long b = y - pow(x, i);
    if (a > b) swap(a, b);
    long long cnt = 0;
    long long c = gcd(b, a, cnt);
    if (cnt % 2 == 0) continue;
    bool can = solve(a, b, win ^ 1);
    if (win == 0) {
      if (!can) return true;
    } else
      yes = yes | !can;
  }
  return yes;
}
int main() {
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) {
    cin >> x >> y;
    if (x > y) swap(x, y);
    if (x == 0) {
      cout << sec << endl;
      continue;
    }
    if (x == 1) {
      cout << fir << endl;
      continue;
    }
    long long cnt = 0;
    long long z = gcd(y, x, cnt);
    long long k = log(y) / log(x);
    bool yes = false;
    for (int i = 1; i <= k; i++) {
      long long a, b;
      a = x;
      b = y - pow(x, i);
      if (a > b) swap(a, b);
      cnt = 0;
      long long c = gcd(b, a, cnt);
      if (cnt % 2 == 0) continue;
      yes = yes | (!solve(a, b, 0));
    }
    if (yes)
      cout << fir << endl;
    else
      cout << sec << endl;
  }
  return 0;
}
