#include <bits/stdc++.h>
using namespace std;
bool Solve2(long long x, long long y) {
  if (y % 2)
    return 1 - x % 2;
  else
    return 1 - (x % (y + 1)) % 2;
}
bool Solve(long long x, long long y) {
  if (x < y) swap(x, y);
  if (y == 0) return 0;
  if (x % y == 0) return 1;
  if (!Solve(x % y, y)) return 1;
  return Solve2(x / y, y);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long x, y;
    cin >> x >> y;
    cout << (Solve(x, y) ? "First" : "Second") << endl;
  };
  return 0;
  return 0;
}
