#include <bits/stdc++.h>
using namespace std;
int n;
int solve(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a == 0 || b == 0) return 0;
  if (a % b == 0) return 1;
  if (solve(b, a % b) == 0) return 1;
  return ((a / b) % (b + 1) + 1) % 2;
}
int main() {
  scanf("%d", &n);
  long long a, b;
  int flag;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d %I64d", &a, &b);
    flag = solve(a, b);
    if (flag)
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
