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 long long INF = (long long)2e9;
const long long inf = (long long)2e18;
const long double eps = (long double)1e-6;
const long long mod = (long long)1e9 + 7;
const long long MAXN = (long long)3e5;
const long long MAXC = (long long)6e6;
const long long MAXLOG = 65;
const long long maxlen = (long long)1e5;
const long long asci = (long long)256;
const long long block = 707;
template <class T>
istream &operator>>(istream &in, vector<T> &arr) {
  for (T &cnt : arr) {
    in >> cnt;
  }
  return in;
};
bool gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (!a) return 0;
  if (!gcd(b % a, a)) return 1;
  if (a % 2) return 1 - (b / a) % 2;
  long long j = a;
  bool ans1 = true;
  bool ans2 = true;
  while ((long double)b / (j / a) < a && j <= b) {
    ans1 ^= (b / j) % 2;
    j *= a;
  }
  j = a;
  while ((long double)(b - a) / (j / a) < a && j <= b - a) {
    ans2 ^= ((b - a) / j) % 2;
    j *= a;
  }
  return ans1 | (!ans2);
}
void solve() {
  long long a, b;
  cin >> a >> b;
  if (gcd(a, b))
    cout << "First\n";
  else
    cout << "Second\n";
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.precision(30);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
