#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
const long long inf = 1e17 + 7;
bool win(long long a, long long b) { return a != 0; }
bool lose(long long a, long long b) { return a % (b + 1) % 2 == 0; }
void solve() {
  long long a, b;
  cin >> a >> b;
  vector<pair<long long, long long> > c;
  while (a != 0 && b != 0) {
    if (a < b) swap(a, b);
    c.emplace_back(a / b, b);
    a = a % b;
  }
  bool to_win = true;
  for (long long i = (long long)c.size() - 1; i >= 0; i--) {
    if (to_win) {
      to_win = !win(c[i].first, c[i].second);
    } else {
      to_win = !lose(c[i].first, c[i].second);
    }
  }
  cout << (!to_win ? "First" : "Second") << endl;
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cout.precision(10);
  long long t;
  cin >> t;
  while (t--) solve();
}
