#include <bits/stdc++.h>
using namespace std;
int dp[100][100];
vector<long long> can;
int test;
int r(long long a, long long b) {
  if ((a == 0) || (b == 0)) return 0;
  int k = r(b % a, a);
  if (k == 0) return 1;
  long long v = (b % a);
  v += a;
  long long c = (b - v) / a;
  if (a & 1) {
    int res = (c & 1);
    return res;
  }
  c %= (a + 1);
  if (c == a) return 1;
  int res = (c & 1);
  return res;
}
int brut(int a, int b) {
  if (dp[a][b] != -1) return dp[a][b];
  if ((a == 0) || (b == 0)) return 0;
  int res = brut(b % a, a);
  if (res == 0) return dp[a][b] = 1;
  int v = a;
  while (b - v >= 0) {
    int nb = b - v;
    res = min(res, brut(min(nb, a), max(nb, a)));
    v *= a;
  }
  res ^= 1;
  return dp[a][b] = res;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    long long a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    int res = r(a, b);
    if (res)
      printf("First\n");
    else
      printf("Second\n");
  }
  return 0;
}
