#include <bits/stdc++.h>
using namespace std;
bool win(long long A, long long B) {
  if (A == 0 || B == 0) return false;
  if (A > B) swap(A, B);
  if (!win(A, B % A)) return true;
  long long N = B / A;
  long long MOD = A + 1;
  return ((N % MOD) % 2 == 0);
}
int main(void) {
  int T, t;
  long long A, B;
  cin >> T;
  for ((t) = 0; (t) < (int)(T); (t)++) {
    cin >> A >> B;
    bool ans = win(A, B);
    cout << (ans ? "First" : "Second") << endl;
  }
  return 0;
}
