#include <bits/stdc++.h>
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
using namespace std;
const long long inf = 0x7f7f7f7f;
const long long mod = 1e9 + 7;
const double Pi = acos(-1);
const long double eps = 1e-8;
inline long long fpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
inline long long read() {
  char c = getchar();
  long long x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    write(-x);
    return;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writesp(long long x) { write(x), putchar(' '); }
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
const long long qwq = 2e6 + 10;
long long F[qwq], inv[qwq], Finv[qwq];
void init_C() {
  F[0] = Finv[0] = inv[1] = 1;
  for (long long i = (2), iE = (qwq - 10); i <= iE; i++)
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
  for (long long i = (1), iE = (qwq - 10); i <= iE; i++)
    F[i] = 1ll * (F[i - 1] * i) % mod,
    Finv[i] = 1ll * (Finv[i - 1] * inv[i]) % mod;
}
inline long long C(long long n, long long m) {
  if (m < 0 || m > n || n < 0) return 0;
  return 1ll * F[n] % mod * 1ll * Finv[m] * 1ll % mod * 1ll * Finv[n - m] % mod;
}
long long _;
long long n, m;
signed main() {
  init_C();
  for (_ = read(); _--;) {
    n = read(), m = read();
    long long ans = 1, tmp = n;
    for (long long i = 2; i * i <= n; i++) {
      if (tmp % i == 0) {
        long long q = 0;
        while (tmp % i == 0) tmp /= i, q++;
        ans = ans * C(q + m - 1, m - 1) % mod;
      }
    }
    if (tmp ^ 1) ans = ans * C(m, 1) % mod;
    ans = ans * fpow(2, m - 1) % mod;
    printf("%lld\n", ans);
  }
}

### Prompt

Develop a solution in cpp to the problem described below:

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>
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
using namespace std;
const long long inf = 0x7f7f7f7f;
const long long mod = 1e9 + 7;
const double Pi = acos(-1);
const long double eps = 1e-8;
inline long long fpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
inline long long read() {
  char c = getchar();
  long long x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    write(-x);
    return;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writesp(long long x) { write(x), putchar(' '); }
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
const long long qwq = 2e6 + 10;
long long F[qwq], inv[qwq], Finv[qwq];
void init_C() {
  F[0] = Finv[0] = inv[1] = 1;
  for (long long i = (2), iE = (qwq - 10); i <= iE; i++)
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
  for (long long i = (1), iE = (qwq - 10); i <= iE; i++)
    F[i] = 1ll * (F[i - 1] * i) % mod,
    Finv[i] = 1ll * (Finv[i - 1] * inv[i]) % mod;
}
inline long long C(long long n, long long m) {
  if (m < 0 || m > n || n < 0) return 0;
  return 1ll * F[n] % mod * 1ll * Finv[m] * 1ll % mod * 1ll * Finv[n - m] % mod;
}
long long _;
long long n, m;
signed main() {
  init_C();
  for (_ = read(); _--;) {
    n = read(), m = read();
    long long ans = 1, tmp = n;
    for (long long i = 2; i * i <= n; i++) {
      if (tmp % i == 0) {
        long long q = 0;
        while (tmp % i == 0) tmp /= i, q++;
        ans = ans * C(q + m - 1, m - 1) % mod;
      }
    }
    if (tmp ^ 1) ans = ans * C(m, 1) % mod;
    ans = ans * fpow(2, m - 1) % mod;
    printf("%lld\n", ans);
  }
}

```