#include <bits/stdc++.h>
using namespace std;
class P {
 public:
  long long a, b;
  P(long long _a, long long _b) {
    a = _a;
    b = _b;
    if (a < b) swap(a, b);
  }
};
vector<P> bench;
void GCD(long long a, long long b) {
  bench.push_back(P(a, b));
  if (a < b) swap(a, b);
  if (b != 0) GCD(a % b, b);
}
long long digitSum(long long m, long long b) {
  long long ans = 0;
  while (m) {
    ans += m % b;
    m /= b;
  }
  return ans;
}
int main() {
  int t, i;
  long long a, b, m, bb;
  bool W[1000];
  scanf("%d", &t);
  while (t--) {
    scanf("%I64d %I64d", &a, &b);
    bench.clear();
    GCD(a, b);
    reverse(bench.begin(), bench.end());
    W[0] = false;
    for (i = 1; i < bench.size(); i++) {
      if (!W[i - 1]) {
        W[i] = true;
        continue;
      }
      m = bench[i].a / bench[i].b;
      bb = bench[i].b;
      if ((m - (m / (bb + 1)) * (bb + 1)) & 1)
        W[i] = false;
      else
        W[i] = true;
    }
    if (W[bench.size() - 1])
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
