#include <bits/stdc++.h>
using namespace std;
void ch_max(int &x, int y) {
  if (x < y) x = y;
}
void ch_min(int &x, int y) {
  if (x > y) x = y;
}
const double pi = acos(-1.0);
const double eps = 1e-9;
bool solve(long long a, long long b) {
  if (a == 0 || b == 0) return false;
  if (a < b) swap(a, b);
  if (a % b == 0) return true;
  if (!solve(a % b, b)) return true;
  long long t0 = a / b;
  long long t1 = t0 % (b + 1);
  if (t1 % 2) return false;
  return true;
}
int main() {
  int i, j, k, t, nc = 0;
  scanf("%d", &t);
  while (t--) {
    long long a, b;
    scanf("%I64d%I64d", &a, &b);
    if (solve(a, b))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
