#include <bits/stdc++.h>
using namespace std;
string s[] = {"First", "Second"};
long long f(long long x, long long y) {
  if (!x || !y) return 0;
  long long a = min(x, y);
  long long b = max(x, y);
  if (f(b % a, a)) {
    b /= a;
    return !((b % (a + 1)) & 1);
  }
  return 1;
}
signed main() {
  long long T;
  cin >> T;
  while (T--) {
    long long x, y;
    cin >> x >> y;
    cout << s[!f(x, y)] << endl;
  }
  return 0;
}
