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