#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int st[105][105];
void stup() {
  for (int i = 1; i <= int(105 - 1); i++) {
    st[i][0] = st[0][i] = -1;
  }
  for (int i = 1; i <= int(105 - 1); i++) {
    for (int j = 1; j <= int(105 - 1); j++) {
      if (i >= j) {
        st[i][j] = -1;
        if (st[i % j][j] == -1) st[i][j] = 1;
        int a = j;
        while (a <= i) {
          if (st[i - a][j] == -1) st[i][j] = 1;
          a *= j;
          if (j == 1) break;
        }
      } else {
        st[i][j] = -1;
        if (st[i][j % i] == -1) st[i][j] = 1;
        int a = i;
        while (a <= j) {
          if (st[i][j - a] == -1) st[i][j] = 1;
          a *= i;
          if (i == 1) break;
        }
      }
    }
  }
}
int calc(long long a, long long b) {
  if (a == 0) return -1;
  if (a == 1) return 1;
  if (calc(b % a, a) == -1) return 1;
  b /= a;
  if (a % 2 == 1) {
    if (b & 1) return -1;
    return 1;
  }
  b = (b - 1) % (a + 1);
  if (b == a || (b % 2 == 1)) return 1;
  return -1;
}
int main() {
  int t;
  cin >> t;
  for (int it = 0; it < int(t); it++) {
    long long a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    if (calc(a, b) == 1)
      cout << "First\n";
    else
      cout << "Second\n";
  }
  return 0;
}
