#include <bits/stdc++.h>
using namespace std;
int pri[1000 + 5];
int p[30];
long long f[1000050];
long long pow_2[1000005];
void getPrime() {
  int i, j;
  for (i = 2; i <= 1000; i++) {
    if (pri[i] == 0) pri[++pri[0]] = i;
    for (j = 1; j <= pri[0] && pri[j] <= 1000 / i; j++) {
      pri[pri[j] * i] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int q;
int x, y;
void getp(int x) {
  p[0] = 0;
  for (int i = 1; i <= pri[0]; i++) {
    if (x % pri[i] == 0) {
      int cnt = 0;
      while (x % pri[i] == 0) {
        x /= pri[i];
        cnt++;
      }
      p[++p[0]] = cnt;
    }
  }
  if (x != 1) p[++p[0]] = 1;
}
long long pow_m(long long a, long long n) {
  long long ret = 1;
  long long tmp = a % 1000000007LL;
  while (n) {
    if (n & 1) ret = ret * tmp % 1000000007LL;
    tmp = tmp * tmp % 1000000007LL;
    n >>= 1;
  }
  return ret;
}
long long Lucas(long long a, long long k, long long p) {
  long long re = 1;
  while (a && k) {
    long long aa = a % p;
    long long bb = k % p;
    if (aa < bb) return 0;
    re = re * f[aa] % p * pow_m(f[bb] * f[aa - bb] % p, p - 2) % p;
    a /= p;
    k /= p;
  }
  return re;
}
void init() {
  int i, j;
  f[0] = 1;
  f[1] = 1;
  for (i = 2; i <= 1000040; i++) {
    f[i] = f[i - 1] * i % 1000000007LL;
  }
  pow_2[0] = 1;
  for (i = 1; i <= 1000000; i++) {
    pow_2[i] = pow_2[i - 1] * 2 % 1000000007LL;
  }
}
int main() {
  int i, j;
  getPrime();
  init();
  scanf("%d", &q);
  while (q--) {
    long long ans = 1;
    scanf("%d%d", &x, &y);
    getp(x);
    for (i = 1; i <= p[0]; i++) {
      ans = ans * Lucas(p[i] + y - 1, p[i], 1000000007LL) % 1000000007LL;
    }
    ans = ans * pow_2[y - 1] % 1000000007LL;
    printf("%I64d\n", ans);
  }
  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;
int pri[1000 + 5];
int p[30];
long long f[1000050];
long long pow_2[1000005];
void getPrime() {
  int i, j;
  for (i = 2; i <= 1000; i++) {
    if (pri[i] == 0) pri[++pri[0]] = i;
    for (j = 1; j <= pri[0] && pri[j] <= 1000 / i; j++) {
      pri[pri[j] * i] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int q;
int x, y;
void getp(int x) {
  p[0] = 0;
  for (int i = 1; i <= pri[0]; i++) {
    if (x % pri[i] == 0) {
      int cnt = 0;
      while (x % pri[i] == 0) {
        x /= pri[i];
        cnt++;
      }
      p[++p[0]] = cnt;
    }
  }
  if (x != 1) p[++p[0]] = 1;
}
long long pow_m(long long a, long long n) {
  long long ret = 1;
  long long tmp = a % 1000000007LL;
  while (n) {
    if (n & 1) ret = ret * tmp % 1000000007LL;
    tmp = tmp * tmp % 1000000007LL;
    n >>= 1;
  }
  return ret;
}
long long Lucas(long long a, long long k, long long p) {
  long long re = 1;
  while (a && k) {
    long long aa = a % p;
    long long bb = k % p;
    if (aa < bb) return 0;
    re = re * f[aa] % p * pow_m(f[bb] * f[aa - bb] % p, p - 2) % p;
    a /= p;
    k /= p;
  }
  return re;
}
void init() {
  int i, j;
  f[0] = 1;
  f[1] = 1;
  for (i = 2; i <= 1000040; i++) {
    f[i] = f[i - 1] * i % 1000000007LL;
  }
  pow_2[0] = 1;
  for (i = 1; i <= 1000000; i++) {
    pow_2[i] = pow_2[i - 1] * 2 % 1000000007LL;
  }
}
int main() {
  int i, j;
  getPrime();
  init();
  scanf("%d", &q);
  while (q--) {
    long long ans = 1;
    scanf("%d%d", &x, &y);
    getp(x);
    for (i = 1; i <= p[0]; i++) {
      ans = ans * Lucas(p[i] + y - 1, p[i], 1000000007LL) % 1000000007LL;
    }
    ans = ans * pow_2[y - 1] % 1000000007LL;
    printf("%I64d\n", ans);
  }
  return 0;
}

```