#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
bool canWin(long long a, long long b) {
  if (a > b) return canWin(b, a);
  if (a == 0) return 0;
  if (canWin(b % a, a) == 0) return 1;
  long long i = b / a - 1;
  long long k = i % (a + 1);
  if ((k & 1) or k == a) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    long long a, b;
    cin >> a >> b;
    if (canWin(a, b))
      cout << "First\n";
    else
      cout << "Second\n";
  }
  return 0;
}
