#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 9, inf = 1e18, mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, d, k;
    cin >> a >> b >> c >> d >> k;
    int x = (a + c - 1) / c;
    int y = k - x;
    if (y * d >= b)
      cout << x << " " << y << "\n";
    else
      cout << -1 << "\n";
  }
}
