#include<iostream> #include<vector> using namespace std; int min(int x, int y){return x<y? x: y;} int main(){ int N,M; cin >> N >> M; vector<int> X(N), Y(M); for (int i=1; i<=N; i++) cin >> X[i-1]; for (int j=1; j<=M; j++) cin >> Y[j-1]; int infty=1001001001; int z=0; for (auto x:X){ z=infty; for (auto y:Y){ if (x<y){ z=min(z,y); } } if (z==infty){ cout << "Infinity" << endl; }else{ cout << z-x << endl; } } }