#include using namespace std; int main() { int a,b,c,T; cin >> T; while(T--) { cin >> a >> b >> c; if(c % 2) { cout << "Impossible" << endl; continue; } c = c / 2; bool f = true; if(a < b) { swap(a,b); f = false; } int aa = c / a; bool fx = false; for(int i = aa; i >=0; i--) { if(((c - i * a) % b) == 0) { fx = true; if(f) cout << i * 2 << " " << 2* ((c - i * a) / b) << endl; else cout << 2 * ((c - i * a)) / b << " " << 2 * i << endl; break; } } if(!fx) cout << "Impossible" << endl; } return 0; }