#include <bits/stdc++.h>
using namespace std;
const double OO = 1e9;
const double EPS = 1e-6;
const int MAXN = 257;
bool win(long long a, long long b) {
  if (a > b) return win(b, a);
  if (a == 0) return false;
  if (not win(b % a, a)) return true;
  return ((b / a) % (a + 1)) % 2 == 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    long long a, b;
    cin >> a >> b;
    if (win(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
