#include <bits/stdc++.h>
using namespace std;
const int maxN = 10000 + 10;
int N;
bool solve(long long a, long long b) {
  if (a == 0 || b == 0) return false;
  if (!solve(b % a, a)) return true;
  return (b / a) % (a + 1) % 2 == 0;
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    long long a, b;
    scanf("%I64d %I64d", &a, &b);
    if (solve((a < b ? a : b), (a > b ? a : b)))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
