#include <bits/stdc++.h>
using namespace std;
bool winable(long long a, long long b) {
  long long ps;
  if (b % 2 == 0)
    ps = b + 1;
  else
    ps = 2;
  long long q = a / b;
  return ((q % ps) % 2) == 0;
}
bool solve(long long a, long long b) {
  vector<pair<long long, long long> > st;
  while (b > 0) {
    st.push_back(make_pair(a, b));
    long long t = b;
    b = a % b;
    a = t;
  }
  reverse(st.begin(), st.end());
  bool state = false;
  for (int i = 0; i < st.size(); ++i) {
    if (!state) {
      state = true;
      continue;
    }
    if (winable(st[i].first, st[i].second)) continue;
    state = false;
  }
  return state;
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    long long a, b;
    cin >> a >> b;
    if (a < b) {
      long long t = a;
      a = b;
      b = t;
    }
    cout << (solve(a, b) ? "First" : "Second") << endl;
  }
  return 0;
}
