#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007LL;
long long large = 1000000000000000000LL;
bitset<1000000000> vis;
vector<int> primes;
void sieve(long long n) {
  vis.set();
  vis[0] = 0;
  vis[1] = 0;
  for (long long i = 2; i <= n; i++) {
    if (vis[i]) {
      for (long long j = i * i; j <= n; j += i) {
        vis[j] = 0;
      }
      primes.push_back((int)i);
    }
  }
}
void gcdE(long long a, long long b, long long& d, long long& x, long long& y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    gcdE(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long inv(long long a, long long n) {
  long long d, x, y;
  gcdE(a, n, d, x, y);
  return d == 1 ? (x + n) % n : -1;
}
vector<long long> per(2000010, 1LL);
long long mul(long long x, long long y) { return (x * y) % mod; }
long long c(long long n, long long m) {
  return mul(per[n], inv(mul(per[m], per[n - m]), mod));
}
long long power(long long a, long long x) {
  if (x == 0LL) return 1LL;
  long long ans = power(a, x / 2);
  ans = mul(ans, ans);
  if (x & 1) ans = mul(ans, a);
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i < 2000010; i++) {
    per[i] = mul(i, per[i - 1]);
  }
  sieve(1000010);
  int q;
  cin >> q;
  while (q--) {
    long long x;
    int y;
    cin >> x >> y;
    vector<int> a;
    for (int i = 0; i < (int)primes.size(); i++) {
      if (x == 1) break;
      if (1LL * primes[i] * primes[i] > x) {
        a.push_back(1);
        break;
      }
      if (x % primes[i] == 0) {
        int cnt = 0;
        while (x % primes[i] == 0) {
          x /= primes[i];
          cnt++;
        }
        a.push_back(cnt);
      }
    }
    long long way = 1LL;
    for (int i = 0; i < (int)a.size(); i++) {
      way = mul(way, c(a[i] + y - 1, y - 1));
    }
    cout << mul(way, power(2, y - 1)) << endl;
  }
  return 0;
}

### Prompt

Please formulate a Cpp solution to 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;
long long mod = 1000000007LL;
long long large = 1000000000000000000LL;
bitset<1000000000> vis;
vector<int> primes;
void sieve(long long n) {
  vis.set();
  vis[0] = 0;
  vis[1] = 0;
  for (long long i = 2; i <= n; i++) {
    if (vis[i]) {
      for (long long j = i * i; j <= n; j += i) {
        vis[j] = 0;
      }
      primes.push_back((int)i);
    }
  }
}
void gcdE(long long a, long long b, long long& d, long long& x, long long& y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    gcdE(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long inv(long long a, long long n) {
  long long d, x, y;
  gcdE(a, n, d, x, y);
  return d == 1 ? (x + n) % n : -1;
}
vector<long long> per(2000010, 1LL);
long long mul(long long x, long long y) { return (x * y) % mod; }
long long c(long long n, long long m) {
  return mul(per[n], inv(mul(per[m], per[n - m]), mod));
}
long long power(long long a, long long x) {
  if (x == 0LL) return 1LL;
  long long ans = power(a, x / 2);
  ans = mul(ans, ans);
  if (x & 1) ans = mul(ans, a);
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i < 2000010; i++) {
    per[i] = mul(i, per[i - 1]);
  }
  sieve(1000010);
  int q;
  cin >> q;
  while (q--) {
    long long x;
    int y;
    cin >> x >> y;
    vector<int> a;
    for (int i = 0; i < (int)primes.size(); i++) {
      if (x == 1) break;
      if (1LL * primes[i] * primes[i] > x) {
        a.push_back(1);
        break;
      }
      if (x % primes[i] == 0) {
        int cnt = 0;
        while (x % primes[i] == 0) {
          x /= primes[i];
          cnt++;
        }
        a.push_back(cnt);
      }
    }
    long long way = 1LL;
    for (int i = 0; i < (int)a.size(); i++) {
      way = mul(way, c(a[i] + y - 1, y - 1));
    }
    cout << mul(way, power(2, y - 1)) << endl;
  }
  return 0;
}

```