#include <bits/stdc++.h>
using namespace std;
long long a, b;
bool solve(long long x, long long y) {
  if (!x) return 0;
  return !solve(y % x, x) || !(y / x % (x + 1) & 1);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    if (a > b) a ^= b ^= a ^= b;
    puts(solve(a, b) ? "First" : "Second");
  }
}
