#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> A >> B; if(B%3==0) cout << 0 << ' ' << A << endl; else if(B%3==1) cout << A << ' ' << 0 << endl; else cout << -A << ' ' << -A << endl; return 0; }