#include using namespace std; using ll = long long; int n,x,a[10001],ret,now = 1e9; set> stone; int lsb(int b) { return (b & (-b)); } int main(){ cin >> n; for(int i = 1; i <= n; i++){ cin >> a[i]; x ^= a[i]; stone.insert(make_pair(a[i], i)); } if(x == 0){ cout << "Second" << endl; } else { cout << "First" << endl; bool moveMade = false; for(int i = 1; i <= n && !moveMade; i++){ int oldVal = a[i]; for(int j = 1; j <= oldVal; j++){ int newVal = oldVal - j; if((x ^ oldVal ^ newVal) == 0){ stone.erase(make_pair(oldVal, i)); a[i] = newVal; if(newVal > 0) stone.insert(make_pair(newVal, i)); cout << i << " " << j << endl; moveMade = true; break; } } } cin >> ret; assert(ret != -1); if(ret == 1){ return 0; } } while(!stone.empty()){ int idx, num; cin >> idx >> num >> ret; assert(ret != -1); if(ret == 1){ return 0; } stone.erase(make_pair(a[idx], idx)); a[idx] -= num; if(a[idx] > 0) stone.insert(make_pair(a[idx], idx)); int er = lsb(num); auto it = stone.end(); it--; auto chosen = *it; stone.erase(it); a[chosen.second] -= er; int newVal = chosen.first - er; if(newVal > 0) stone.insert(make_pair(newVal, chosen.second)); cout << chosen.second << " " << er << endl; cin >> ret; assert(ret != -1); if(ret == 1){ return 0; } } }