#include <bits/stdc++.h>
using namespace std;
bool win(long long a, long long b) {
  if (a == 0)
    return false;
  else if (!win(b % a, a))
    return true;
  else
    return (b / a) % (a + 1) % 2 == 0;
}
int main() {
  int T;
  long long a, b;
  cin >> T;
  while (T--) {
    cin >> a >> b;
    if (a > b) swap(a, b);
    cout << (win(a, b) ? "First" : "Second") << endl;
  }
}
