#include <bits/stdc++.h>
using namespace std;
bool solve(long long a, long long b) {
  if (a > b) return solve(b, a);
  assert(a <= b);
  if (a == 0LL) return false;
  long long mod = b % a;
  if (!solve(mod, a)) return true;
  long long dist = (b - mod) / a;
  if (a % 2) {
    return dist % 2 == 0;
  } else {
    long long x = dist % (a + 1);
    return x % 2 == 0;
  }
}
int main() {
  long long T;
  scanf("%I64d", &T);
  while (T--) {
    long long a, b;
    scanf("%I64d %I64d", &a, &b);
    puts(solve(a, b) ? "First" : "Second");
  }
}
