#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=double; ld pie=3.14159265359; ll mod=998244353; long long inf=100000000000000001; int main(){ ll t; cin >> t; vectortwo(62,1); for (ll i = 1; i < two.size(); i++) { two[i]=two[i-1]*2; } for (ll o = 0; o < t; o++) { ll a,b; cin >> a >> b; ll x=b-a; ll now=0; for (ll i = 0; i <=60; i++) { if (a%two[i]==0) { now=max(now,i); } } vectorans; ll aa=a; while (two[now]=0; i--) { if (two[i]&x) { ans.push_back(two[i]); } } cout << ans.size() << endl; for (ll i = 0; i < ans.size(); i++) { cout << ans[i]<< ' '; } cout << endl; } }