#include <bits/stdc++.h>
using namespace std;
int t;
long long a, b;
bool solve(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a > b) return solve(b, a);
  if (!solve(a, b % a)) return 1;
  long long cur = b / a;
  if (a & 1) return cur % 2 == 0;
  return (cur % (a + 1)) % 2 == 0;
}
int main() {
  cin >> t;
  while (t--) {
    cin >> a >> b;
    if (solve(a, b))
      cout << "First" << endl;
    else
      cout << "Second" << endl;
  }
  return 0;
}
