#include <bits/stdc++.h>
using namespace std;
vector<long long int> g[100005];
long long int vis[100005];
long long int prime[5000003] = {0};
long long int fact[1000020];
long long int inv[1000020];
vector<long long int> divisor(long long int n) {
  vector<long long int> v;
  for (long long int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (n / i != i) v.push_back(n / i);
    }
  }
  return v;
}
vector<long long int> msieve() {
  prime[0] = 1;
  prime[1] = 1;
  vector<long long int> v;
  for (long long int i = 2; i <= 1000002; i++) {
    if (prime[i] == 0) {
      prime[i] = i;
      for (long long int j = 2 * i; j <= 1000002; j += i) prime[j] = i;
    }
  }
  for (long long int i = 2; i < 1000002; i++)
    if (prime[i] == i) v.push_back(i);
  return v;
}
long long int no_of_div(long long int n) {
  long long int c = 1, ans = 1;
  while (n > 1) {
    if (prime[n] == prime[n / prime[n]])
      c++;
    else {
      ans *= (c + 1);
      c = 1;
    }
    n = n / prime[n];
  }
  return ans;
}
vector<long long int> no_of_fact(long long int n) {
  vector<long long int> v;
  long long int c = 0, ans = 1;
  while (n > 1) {
    v.push_back(prime[n]);
    c++;
    n = n / prime[n];
  }
  return v;
}
long long binpow(long long int a, long long int b, long long int m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = ((a % m) * (a % m)) % m;
    b >>= 1;
  }
  return res;
}
void cal1() {
  fact[0] = 1;
  for (long long int i = 1; i <= 1000020; i++) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
  }
  for (long long int i = 0; i <= 1000020; i++) {
    inv[i] = binpow(fact[i], 1000000007 - 2, 1000000007);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cal1();
  vector<long long int> v = msieve();
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int x, y;
    cin >> x >> y;
    vector<long long int> w = no_of_fact(x);
    long long int c = 1;
    long long int an = 1;
    for (long long int i = 1; i < w.size(); i++) {
      if (w[i] == w[i - 1])
        c++;
      else {
        an = (((an * fact[y + c - 1]) % 1000000007) *
              ((inv[c] * inv[y - 1]) % 1000000007)) %
             1000000007;
        c = 1;
      }
    }
    an = (an * binpow(2, y - 1, 1000000007)) % 1000000007;
    if (w.size() > 0)
      an = (((an * fact[y + c - 1]) % 1000000007) *
            ((inv[c] * inv[y - 1]) % 1000000007)) %
           1000000007;
    cout << an << endl;
  }
  return 0;
}

### 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>
using namespace std;
vector<long long int> g[100005];
long long int vis[100005];
long long int prime[5000003] = {0};
long long int fact[1000020];
long long int inv[1000020];
vector<long long int> divisor(long long int n) {
  vector<long long int> v;
  for (long long int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (n / i != i) v.push_back(n / i);
    }
  }
  return v;
}
vector<long long int> msieve() {
  prime[0] = 1;
  prime[1] = 1;
  vector<long long int> v;
  for (long long int i = 2; i <= 1000002; i++) {
    if (prime[i] == 0) {
      prime[i] = i;
      for (long long int j = 2 * i; j <= 1000002; j += i) prime[j] = i;
    }
  }
  for (long long int i = 2; i < 1000002; i++)
    if (prime[i] == i) v.push_back(i);
  return v;
}
long long int no_of_div(long long int n) {
  long long int c = 1, ans = 1;
  while (n > 1) {
    if (prime[n] == prime[n / prime[n]])
      c++;
    else {
      ans *= (c + 1);
      c = 1;
    }
    n = n / prime[n];
  }
  return ans;
}
vector<long long int> no_of_fact(long long int n) {
  vector<long long int> v;
  long long int c = 0, ans = 1;
  while (n > 1) {
    v.push_back(prime[n]);
    c++;
    n = n / prime[n];
  }
  return v;
}
long long binpow(long long int a, long long int b, long long int m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = ((a % m) * (a % m)) % m;
    b >>= 1;
  }
  return res;
}
void cal1() {
  fact[0] = 1;
  for (long long int i = 1; i <= 1000020; i++) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
  }
  for (long long int i = 0; i <= 1000020; i++) {
    inv[i] = binpow(fact[i], 1000000007 - 2, 1000000007);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cal1();
  vector<long long int> v = msieve();
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int x, y;
    cin >> x >> y;
    vector<long long int> w = no_of_fact(x);
    long long int c = 1;
    long long int an = 1;
    for (long long int i = 1; i < w.size(); i++) {
      if (w[i] == w[i - 1])
        c++;
      else {
        an = (((an * fact[y + c - 1]) % 1000000007) *
              ((inv[c] * inv[y - 1]) % 1000000007)) %
             1000000007;
        c = 1;
      }
    }
    an = (an * binpow(2, y - 1, 1000000007)) % 1000000007;
    if (w.size() > 0)
      an = (((an * fact[y + c - 1]) % 1000000007) *
            ((inv[c] * inv[y - 1]) % 1000000007)) %
           1000000007;
    cout << an << endl;
  }
  return 0;
}

```