For this Question: Let's assume some functional definitions for this problem.
We take prime(x) as the set of all prime divisors of x. For example, prime(140)={2,5,7}, prime(169)={13}.

Let f(x,p) be the maximum possible integer p**k where k is an integer such that x is divisible by p**k.
(Here a**b means a raised to the power b or pow(a, b)) 
For example:
f(99,3)=9 (99 is divisible by 3**2=9 but not divisible by 3**3=27),
f(63,7)=7 (63 is divisible by 7**1=7 but not divisible by 7**2=49).

Let g(x,y) be the product of f(y,p) for all p in prime(x). 
For example:
g(30,70)=f(70,2)*f(70,3)*f(70,5)=2*1*5=10,
g(525,63)=f(63,3)*f(63,5)*f(63,7)=9*1*7=63.

You are given two integers x and n. Calculate g(x,1)*g(x,2)*…*g(x,n) mod (1000000007).

(Read modulo exponentiation before attempting this problem)The only line contains integers x and n — the numbers used in formula.

Constraints
2 ≤ x ≤ 1000000000
1 ≤ n ≤ 1000000000000000000Print the answer corresponding to the input.Sample Input 1
10 2

Sample Output 1
2

Sample Input 2
20190929 1605

Sample Output 2
363165664

Explanation
In the first example, g(10,1)=f(1,2)⋅f(1,5)=1, g(10,2)=f(2,2)⋅f(2,5)=2., I have written this Solution Code: import java.io.*;
import java.util.*;

class Main {
 static long mod =1000000007;
	public static boolean isPrime(long m){
		if (m <2)
			return false;
		for(int i =2 ;i*i<=m;i++)
		{
			if (m%i == 0)
				return false;
		}
		return true;
	}

	public static void main (String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s [] =br.readLine().trim().split(" ");
		long x = Long.parseLong(s[0]);
		long n =  Long.parseLong(s[1]);
		long ans = 1;
		for(int i = 2; i*i <= x; i++){
			if(x%i != 0)	continue;
			ans = (ans*f(n, i)) % mod;
			while(x%i == 0)
				x /= i;
		}
		if(x > 1)
			ans = (ans*f(n, x)) % mod;
			System.out.println(ans);
		}

	static long f(long n, long p){
		long ans = 1;
		long cur = 1;
		while(cur <= n/p){
		cur = cur*p;
		long z = power(p, n/cur);
		ans = (ans*z) % mod;
		}
		return ans;
	}

	public static long power(long no,long pow){
		long p = 1000000007;
		long result = 1;
		while(pow > 0)
		{
			if ( (pow & 1) == 1)
				result = ((result%p) * (no%p))%p;

			no = ((no%p) * (no%p))%p;
			pow >>= 1;

		}
		return result;
	}




}, In this Programming Language: Java, Now tell me if this Code is compilable or not?