#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int BASE = 27;
bool solve(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return false;
  bool win = false;
  if (!solve(a, b % a)) win = true;
  long long g = b / a;
  if (a % 2 == 1 && g % 2 == 0) win = true;
  if (a % 2 == 0 && (g % (a + 1)) % 2 == 0) win = true;
  return win;
}
int t;
long long a, b;
int main() {
  cin >> t;
  while (t--) {
    cin >> a >> b;
    puts(solve(a, b) ? "First" : "Second");
  }
  return 0;
}
