#include <bits/stdc++.h>
using namespace std;
char Ans[2][100] = {"Second", "First"};
int solve(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return 0;
  if (!solve(a, b % a)) return 1;
  long long t = b / a;
  return (t % (a + 1)) % 2 == 0;
}
int main() {
  int T;
  for (cin >> T; T--;) {
    long long a, b;
    cin >> a >> b;
    printf("%s\n", Ans[solve(a, b)]);
  }
}
