#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int inf = 1791791791;
const long long mod = 1000000007;
long long expr(long long e, long long n) {
  if (!n) return 1ll;
  long long t = expr(e, n / 2);
  if (n & 1)
    return (((e * t) % mod) * t) % mod;
  else
    return (t * t) % mod;
}
long long fact[10 * N];
vector<int> primes;
int p[10 * N];
long long comb(long long a, long long b) {
  return (((fact[a] * expr(fact[b], mod - 2)) % mod) *
          expr(fact[a - b], mod - 2)) %
         mod;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < 10 * N; i++) {
    fact[i] = (long long)i * fact[i - 1];
    fact[i] %= mod;
  }
  for (int i = 2; i < 1000; i++) {
    if (p[i] == 0) {
      primes.push_back(i);
      for (int j = i + i; j < 1000; j += i) {
        p[j] = 1;
      }
    }
  }
  int n;
  scanf("%d", &n);
  while (n--) {
    int x, y;
    scanf("%d %d", &x, &y);
    map<int, int> info;
    for (auto a : primes) {
      if (a > x) break;
      while (x % a == 0) {
        x /= a;
        info[a]++;
      }
    }
    if (x != 1) info[x]++;
    long long resp = expr(2ll, y - 1);
    for (auto a : info) {
      resp *= comb(a.second + y - 1, y - 1);
      resp %= mod;
    }
    printf("%lld\n", resp);
  }
  return 0;
}

### Prompt

In CPP, your task is to solve 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;
const int N = 1e5 + 5;
const int inf = 1791791791;
const long long mod = 1000000007;
long long expr(long long e, long long n) {
  if (!n) return 1ll;
  long long t = expr(e, n / 2);
  if (n & 1)
    return (((e * t) % mod) * t) % mod;
  else
    return (t * t) % mod;
}
long long fact[10 * N];
vector<int> primes;
int p[10 * N];
long long comb(long long a, long long b) {
  return (((fact[a] * expr(fact[b], mod - 2)) % mod) *
          expr(fact[a - b], mod - 2)) %
         mod;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < 10 * N; i++) {
    fact[i] = (long long)i * fact[i - 1];
    fact[i] %= mod;
  }
  for (int i = 2; i < 1000; i++) {
    if (p[i] == 0) {
      primes.push_back(i);
      for (int j = i + i; j < 1000; j += i) {
        p[j] = 1;
      }
    }
  }
  int n;
  scanf("%d", &n);
  while (n--) {
    int x, y;
    scanf("%d %d", &x, &y);
    map<int, int> info;
    for (auto a : primes) {
      if (a > x) break;
      while (x % a == 0) {
        x /= a;
        info[a]++;
      }
    }
    if (x != 1) info[x]++;
    long long resp = expr(2ll, y - 1);
    for (auto a : info) {
      resp *= comb(a.second + y - 1, y - 1);
      resp %= mod;
    }
    printf("%lld\n", resp);
  }
  return 0;
}

```