#include using namespace std; int main(){ int N, M; cin >> N >> M; vector X(N), Y(M); for(int i = 0; i < N; i++) cin >> X[i]; for(int i = 0; i < M; i++) cin >> Y[i]; sort(Y.begin(), Y.end()); int INF = 2000000000; Y.push_back(INF); for(int i = 0; i < N; i++){ int ind = lower_bound(Y.begin(), Y.end(), X[i]) - Y.begin(); if(Y[ind] == INF) cout << "Infinity" << endl; else cout << Y[ind] - X[i] << endl; } }