#include "robots.h"
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <unordered_map>
#include <set>
#define endl '\n'
using namespace std;
int putaway(int a, int b, int t, int x[], int y[], int w[], int s[]) {
if(a+b!=2 && t!=2 && b!=0) return 67;
if(a+b==2 && t==2) {
if(a==0 && b==2) {
if(s[0]<y[0] && s[1]<y[1]) return 1;
else if(s[0]<y[1] && s[1]<y[0]) return 1;
else if(max(s[0], s[1])<max(y[0], y[1])) return 2;
else return -1;
}
else if(a==1 && b==1) {
if(s[0]<y[0] && w[1]<x[0]) return 1;
else if(w[0]<x[0] && s[1]<y[0]) return 1;
else if(max(s[0], s[1])<y[0]) return 2;
else if(max(w[0], w[1])<x[0]) return 2;
else return -1;
}
else if(a==2 && b==0) {
if(w[0]<x[0] && w[1]<x[1]) return 1;
else if(w[0]<x[1] && w[1]<x[0]) return 1;
else if(max(w[0], w[1])<max(x[0], x[1])) return 2;
else return -1;
}
else return -1;
}
return -1;
}