#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos((long double)-1.0);
const double EPS = 1e-12;
const int MOD = 1e9 + 7;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  if (n < 0) return 0;
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long sq(long long x) { return x * x; }
double sq(double x) { return x * x; }
namespace Solver {
const int MAXN = 1e6 + 5;
int p[MAXN], ptop;
int pm[MAXN], pk[MAXN];
void sieve(int n) {
  pm[1] = 1, pk[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!pm[i]) p[++ptop] = i, pm[i] = i, pk[i] = i;
    for (int j = 1; j <= ptop; ++j) {
      int t = i * p[j];
      if (t > n) break;
      pm[t] = p[j];
      if (i % p[j])
        pk[t] = pk[p[j]];
      else {
        pk[t] = pk[i] * p[j];
        break;
      }
    }
  }
  cerr << "ptop"
          " = "
       << (ptop) << endl;
}
namespace Combinatory {
const int MOD = 1e9 + 7;
const int MAXN = 2e6 + 5;
long long inv[MAXN], fac[MAXN], invfac[MAXN];
void init(int n) {
  inv[1] = 1;
  for (int i = 2; i <= n; i++) inv[i] = inv[MOD % i] * (MOD - MOD / i) % MOD;
  fac[0] = 1, invfac[0] = 1;
  for (int i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    invfac[i] = invfac[i - 1] * inv[i] % MOD;
  }
}
long long A(long long n, long long m) {
  if (n < m) return 0;
  return fac[n] * invfac[n - m] % MOD;
}
long long C(long long n, long long m) {
  if (n < m) return 0;
  return fac[n] * invfac[n - m] % MOD * invfac[m] % MOD;
}
}  // namespace Combinatory
void InitOnce() {
  int t;
  scanf("%d", &t);
  sieve(1000000);
  Combinatory::init(2000000);
}
int x, y;
void Read() {
  int res = scanf("%d%d", &x, &y);
  if (res == -1) exit(0);
}
void Solve() {
  map<int, int> M;
  while (x > 1) {
    M[pm[x]] += 1;
    x /= pm[x];
  }
  long long ans = 1;
  for (auto i : M) {
    int n = i.second;
    int m = y;
    ans *= Combinatory::C(n + m - 1, n);
    ans %= MOD;
  }
  ans *= qpow(2, y - 1);
  ans %= MOD;
  printf("%lld\n", ans);
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}

### Prompt

Create a solution in CPP for the following problem:

You are given two positive integer numbers x and y. An array F is called an y-factorization of x iff the following conditions are met:

  * There are y elements in F, and all of them are integer numbers; 
  * <image>. 



You have to count the number of pairwise distinct arrays that are y-factorizations of x. Two arrays A and B are considered different iff there exists at least one index i (1 ≤ i ≤ y) such that Ai ≠ Bi. Since the answer can be very large, print it modulo 109 + 7.

Input

The first line contains one integer q (1 ≤ q ≤ 105) — the number of testcases to solve.

Then q lines follow, each containing two integers xi and yi (1 ≤ xi, yi ≤ 106). Each of these lines represents a testcase.

Output

Print q integers. i-th integer has to be equal to the number of yi-factorizations of xi modulo 109 + 7.

Example

Input

2
6 3
4 2


Output

36
6

Note

In the second testcase of the example there are six y-factorizations:

  * { - 4, - 1}; 
  * { - 2, - 2}; 
  * { - 1, - 4}; 
  * {1, 4}; 
  * {2, 2}; 
  * {4, 1}. 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos((long double)-1.0);
const double EPS = 1e-12;
const int MOD = 1e9 + 7;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  if (n < 0) return 0;
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long sq(long long x) { return x * x; }
double sq(double x) { return x * x; }
namespace Solver {
const int MAXN = 1e6 + 5;
int p[MAXN], ptop;
int pm[MAXN], pk[MAXN];
void sieve(int n) {
  pm[1] = 1, pk[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!pm[i]) p[++ptop] = i, pm[i] = i, pk[i] = i;
    for (int j = 1; j <= ptop; ++j) {
      int t = i * p[j];
      if (t > n) break;
      pm[t] = p[j];
      if (i % p[j])
        pk[t] = pk[p[j]];
      else {
        pk[t] = pk[i] * p[j];
        break;
      }
    }
  }
  cerr << "ptop"
          " = "
       << (ptop) << endl;
}
namespace Combinatory {
const int MOD = 1e9 + 7;
const int MAXN = 2e6 + 5;
long long inv[MAXN], fac[MAXN], invfac[MAXN];
void init(int n) {
  inv[1] = 1;
  for (int i = 2; i <= n; i++) inv[i] = inv[MOD % i] * (MOD - MOD / i) % MOD;
  fac[0] = 1, invfac[0] = 1;
  for (int i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    invfac[i] = invfac[i - 1] * inv[i] % MOD;
  }
}
long long A(long long n, long long m) {
  if (n < m) return 0;
  return fac[n] * invfac[n - m] % MOD;
}
long long C(long long n, long long m) {
  if (n < m) return 0;
  return fac[n] * invfac[n - m] % MOD * invfac[m] % MOD;
}
}  // namespace Combinatory
void InitOnce() {
  int t;
  scanf("%d", &t);
  sieve(1000000);
  Combinatory::init(2000000);
}
int x, y;
void Read() {
  int res = scanf("%d%d", &x, &y);
  if (res == -1) exit(0);
}
void Solve() {
  map<int, int> M;
  while (x > 1) {
    M[pm[x]] += 1;
    x /= pm[x];
  }
  long long ans = 1;
  for (auto i : M) {
    int n = i.second;
    int m = y;
    ans *= Combinatory::C(n + m - 1, n);
    ans %= MOD;
  }
  ans *= qpow(2, y - 1);
  ans %= MOD;
  printf("%lld\n", ans);
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}

```