#include <bits/stdc++.h>
using namespace std;
const int MXN = 410;
const int MXK = 10;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const int mod = 1000000007;
int solve(long long a, long long b) {
  if (!b) return 0;
  int s = 0;
  long long r = a % b;
  long long t = a / b - 1;
  int ppc = !solve(b, r);
  if (ppc)
    return 1;
  else if ((t % (b + 1)) & 1 || (t % (b + 1)) == b)
    return 1;
  else
    return 0;
}
int main() {
  int t;
  scanf("%d", &t);
  long long a, b;
  for (int i = (0); i < (t); i++) {
    scanf("%lld%lld", &a, &b);
    int q = solve(max(a, b), min(a, b));
    if (!q)
      printf("Second\n");
    else
      printf("First\n");
  }
  return 0;
}
