#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef long double LD; typedef vector VI; typedef pair PII; const LD eps=1e-9; const LD PI=atan2((LD)0,(LD)-1); const LL MOD=1000000007; const int INF=1<<30; const int ARR_INF=1<<6; const int MAXN=100005; int main() { int T; scanf("%d",&T); while(T--) { int a,b,c; scanf("%d%d%d",&a,&b,&c); bool swp=false; if(a>b) { swap(a,b); swp=true; } bool haveans=false; int numa,numb; for(int i=0;;i+=2) { int rem=c-i*a; if(rem<0) break; if(rem%b==0) { numb=rem/b; if(numb%2==0) { haveans=true; numa=i; break; } } } if(swp) swap(numa,numb); if(haveans) printf("%d %d\n",numa,numb); else printf("Impossible\n"); } return 0; }