#include <bits/stdc++.h>
using namespace std;
bool solve(long long a, long long b) {
  if (a > b) {
    return solve(b, a);
  }
  if (a == 0) {
    return false;
  }
  bool next = solve(b % a, a);
  if (!next) {
    return true;
  }
  long long c = (b / a);
  if ((a % 2 == 1)) {
    return (c % 2 == 0);
  } else {
    return (((b / a) % (a + 1)) % 2 == 0);
  }
}
inline void init() {}
int main() {
  init();
  bool prev = false;
  int T;
  while (cin >> T) {
    if (prev) {
      cout << endl;
    }
    prev = true;
    long long a, b;
    for (int i = 0; i < T; i++) {
      cin >> a >> b;
      cout << (solve(a, b) ? "First" : "Second") << endl;
    }
  }
  return 0;
}
