#include <bits/stdc++.h>
using namespace std;
static long long int a[100005];
static long long int p[100005];
int ac;
void GCD(long long int A, long long int B) {
  ac = 0;
  long long int C;
  while (B) {
    C = A % B;
    a[ac] = (A - C) / B;
    p[ac] = B;
    ac++;
    A = B;
    B = C;
  }
}
int main() {
  int T, iT;
  scanf("%d", &T);
  for (iT = 0; iT < T; iT++) {
    long long int X, Y, Z;
    scanf("%I64i %I64i", &X, &Y);
    if (X < Y) {
      Z = X;
      X = Y;
      Y = Z;
    }
    GCD(X, Y);
    int pos = 0;
    int i;
    for (i = ac - 1; i >= 0; i--) {
      if (pos == 0)
        pos = 1;
      else {
        long long int P = p[i] + 1LL;
        long long int temp = a[i] % P;
        if (temp % 2)
          pos = 0;
        else
          pos = 1;
      }
    }
    if (pos)
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
