#include using namespace std; #define int int64_t int32_t 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()); for (int i = 0; i < n; i++) { auto itr = upper_bound(y.begin(), y.end(), x[i]); int ans = *itr - x[i]; if (ans < 0) cout << "Infinity" << endl; else cout << ans << endl; } }