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