#include <bits/stdc++.h>
using namespace std;
bool solve(unsigned long long a, unsigned long long b) {
  if (b == 0) return false;
  bool res = solve(b, a % b);
  if (!res) return true;
  unsigned long long c = (a - b) / b;
  if (b & 1) return c & 1;
  unsigned long long k = c % (b + 1);
  return (k & 1) || (k == b);
}
int main(void) {
  unsigned long long a, b;
  int i, n;
  cin >> n;
  for (i = 0; i < n; ++i) {
    cin >> a >> b;
    if (a < b) swap(a, b);
    if (solve(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
