#include <bits/stdc++.h>
using namespace std;
inline int L(int i) { return i << 1; }
inline int R(int i) { return (i << 1) | 1; }
inline int B(int i) { return 1 << i; }
inline int low_bit(int x) { return x & (-x); }
long long cnt[1010], top;
long long tmp, mul;
bool must_win(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a > b) tmp = a, a = b, b = tmp;
  if (must_win(b % a, a) == 0) return 1;
  tmp = b;
  tmp /= a;
  tmp %= a + 1;
  if (tmp & 1) return 0;
  return 1;
}
int main() {
  int t;
  long long a, b;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    if (must_win(a, b))
      puts("First");
    else
      puts("Second");
  }
  return 0;
}
