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>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <typename T>
inline T abs(T a) {
  return ((a < 0) ? -a : a);
}
template <typename T>
inline T sqr(T a) {
  return a * a;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
T sign(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
template <typename A, typename B>
inline ostream& operator<<(ostream& out, const pair<A, B>& p) {
  return out << p.X << " " << p.Y << " ";
}
template <typename T>
inline ostream& operator<<(ostream& out, const vector<T>& a) {
  for (int i = 0; i < (int)((int)(a.size())); ++i) {
    if (i) out << ' ';
    out << a[i];
  }
  return out << " ";
}
template <typename T>
inline ostream& operator<<(ostream& out, const set<T>& a) {
  return out << vector<T>(a.begin(), a.end());
}
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
const int dxK[] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int dyK[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int dxKn[] = {-2, -1, 1, 2, 2, 1, -1, -2};
const int dyKn[] = {1, 2, 2, 1, -1, -2, -2, -1};
const int N = int(1e3) + 9;
const int M = int(1e2) + 9;
const int LOGN = 22;
const int SQN = 350;
const int MOD = int(1e9) + 7;
const int INF = 1e9 + 100;
const long long INF64 = 2e18;
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-9;
map<pair<long long, long long>, bool> dp;
bool get(long long a, long long b) {
  if (a > b) swap(a, b);
  if (dp.count(make_pair(a, b))) return dp[make_pair(a, b)];
  dp[make_pair(a, b)] = false;
  if (a == 0) return dp[make_pair(a, b)];
  dp[make_pair(a, b)] |= !get(b % a, a);
  long long cnt = b / a;
  if (a & 1) {
    if (cnt % 2 == 0)
      ;
    dp[make_pair(a, b)] |= get(b % a, a);
  } else {
    cnt %= (a + 1);
    if (!(cnt == a || cnt % 2 == 1)) dp[make_pair(a, b)] |= get(b % a, a);
  }
  return dp[make_pair(a, b)];
}
void solve() {
  int t;
  cin >> t;
  for (int i = 0; i < (int)(t); ++i) {
    long long a, b;
    cin >> a >> b;
    if (get(a, b))
      cout << "First\n";
    else
      cout << "Second\n";
  }
}
int main() {
  srand(time(NULL));
  srand(time(NULL));
  cout << setprecision(10) << fixed;
  cerr << setprecision(10) << fixed;
  solve();
  return 0;
}
