#include <bits/stdc++.h>
inline bool solve(long long a, long long b) {
  if (!a || !b) return 0;
  if (!solve(b % a, a)) return 1;
  long long k = (b / a - 1) % (a + 1);
  return (k & 1) || (k == a);
}
int main() {
  int T;
  long long a, b;
  scanf("%d", &T);
  while (T--) {
    scanf("%lld %lld", &a, &b);
    if (a > b) a ^= b, b ^= a, a ^= b;
    if (solve(a, b))
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
