#include <bits/stdc++.h>
using namespace std;
using tint = long long;
using ld = long double;
using pi = pair<tint, int>;
using pl = pair<tint, tint>;
using vi = vector<int>;
using vpi = vector<pi>;
using vvi = vector<vi>;
using vl = vector<tint>;
using vb = vector<bool>;
const int MOD = 1e9 + 7;
const tint mod = 998244353;
const int MX = 2e6 + 10;
const tint INF = 1e18;
const int inf = 2e9;
const ld PI = acos(ld(-1));
const ld eps = 1e-8;
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
template <class T>
void remDup(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
bool valid(int x, int y, int n, int m) {
  return (0 <= x && x < n && 0 <= y && y < m);
}
int cdiv(int a, int b) { return a / b + ((a ^ b) > 0 && a % b); }
int fdiv(int a, int b) { return a / b - ((a ^ b) < 0 && a % b); }
void NACHO(string name = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if ((int)(name).size()) {
  }
}
int mdiv[MX];
tint fact[MX];
tint inv[MX];
tint binpow(tint a, tint b) {
  a %= MOD;
  tint ret = 1;
  while (b > 0) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b /= 2;
  }
  return ret;
}
tint invv(tint a) { return binpow(a, MOD - 2); }
tint C(tint a, tint b) {
  tint u = fact[a] * inv[b] % MOD;
  u = u * inv[a - b] % MOD;
  return u;
}
int main() {
  NACHO();
  int tc;
  cin >> tc;
  fact[0] = 1;
  for (int i = (1); i < (MX); ++i) fact[i] = fact[i - 1] * i % MOD;
  for (int i = (0); i < (MX); ++i) inv[i] = invv(fact[i]);
  for (int i = (2); i < (MX); ++i) {
    if (!mdiv[i]) {
      for (int j = i; j < MX; j += i) {
        mdiv[j] = i;
      }
    }
  }
  while (tc--) {
    tint x, y;
    cin >> x >> y;
    vl p;
    while (x != 1) {
      tint pri = mdiv[x], tot = 0;
      while (x % pri == 0) {
        ++tot;
        x /= pri;
      }
      p.push_back(tot);
    }
    tint ret = binpow(2, y - 1);
    for (auto& u : p) {
      ret = ret * C(u + y - 1, y - 1) % MOD;
    }
    cout << ret << "\n";
  }
}

### 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;
using tint = long long;
using ld = long double;
using pi = pair<tint, int>;
using pl = pair<tint, tint>;
using vi = vector<int>;
using vpi = vector<pi>;
using vvi = vector<vi>;
using vl = vector<tint>;
using vb = vector<bool>;
const int MOD = 1e9 + 7;
const tint mod = 998244353;
const int MX = 2e6 + 10;
const tint INF = 1e18;
const int inf = 2e9;
const ld PI = acos(ld(-1));
const ld eps = 1e-8;
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
template <class T>
void remDup(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
bool valid(int x, int y, int n, int m) {
  return (0 <= x && x < n && 0 <= y && y < m);
}
int cdiv(int a, int b) { return a / b + ((a ^ b) > 0 && a % b); }
int fdiv(int a, int b) { return a / b - ((a ^ b) < 0 && a % b); }
void NACHO(string name = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if ((int)(name).size()) {
  }
}
int mdiv[MX];
tint fact[MX];
tint inv[MX];
tint binpow(tint a, tint b) {
  a %= MOD;
  tint ret = 1;
  while (b > 0) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b /= 2;
  }
  return ret;
}
tint invv(tint a) { return binpow(a, MOD - 2); }
tint C(tint a, tint b) {
  tint u = fact[a] * inv[b] % MOD;
  u = u * inv[a - b] % MOD;
  return u;
}
int main() {
  NACHO();
  int tc;
  cin >> tc;
  fact[0] = 1;
  for (int i = (1); i < (MX); ++i) fact[i] = fact[i - 1] * i % MOD;
  for (int i = (0); i < (MX); ++i) inv[i] = invv(fact[i]);
  for (int i = (2); i < (MX); ++i) {
    if (!mdiv[i]) {
      for (int j = i; j < MX; j += i) {
        mdiv[j] = i;
      }
    }
  }
  while (tc--) {
    tint x, y;
    cin >> x >> y;
    vl p;
    while (x != 1) {
      tint pri = mdiv[x], tot = 0;
      while (x % pri == 0) {
        ++tot;
        x /= pri;
      }
      p.push_back(tot);
    }
    tint ret = binpow(2, y - 1);
    for (auto& u : p) {
      ret = ret * C(u + y - 1, y - 1) % MOD;
    }
    cout << ret << "\n";
  }
}

```