#include #include #include using namespace std; int main(){ int n, m; cin >> n >> m; vector a(n), b(m); for(int i = 0; i < n; ++i){ cin >> a[i]; } for(int i = 0; i < m; ++i){ cin >> b[i]; } //sort(a.begin(), a.end()); sort(b.begin(), b.end()); for(int i = 0; i < n; ++i){ auto itr = lower_bound(b.begin(), b.end(), a[i]); if(itr == b.end()){ cout << "Infinity" << " "; }else{ cout << *itr - a[i] << " "; } } cout << endl; return 0; }