#include <bits/stdc++.h>
bool win(long long a, long long b) {
  if (a > b) {
    return win(b, a);
  }
  if (a == 0) {
    return false;
  }
  if (!win(b % a, a)) {
    return true;
  }
  int res = (b / a - 1) % (a + 1);
  return (res & 1) || res == a;
}
int main() {
  int taskNumber;
  scanf("%d", &taskNumber);
  for (int taskIdx = 0; taskIdx < taskNumber; taskIdx++) {
    long long a, b;
    scanf("%I64d%I64d", &a, &b);
    puts(win(a, b) ? "First" : "Second");
  }
  return 0;
}
