Consider sequences \\{A_1,...,A_N\\} of length N consisting of integers between 1 and K (inclusive).

There are K^N such sequences. Find the sum of \gcd(A_1, ..., A_N) over all of them.

Since this sum can be enormous, print the value modulo (10^9+7).

Here \gcd(A_1, ..., A_N) denotes the greatest common divisor of A_1, ..., A_N.

Constraints

* 2 \leq N \leq 10^5
* 1 \leq K \leq 10^5
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N K


Output

Print the sum of \gcd(A_1, ..., A_N) over all K^N sequences, modulo (10^9+7).

Examples

Input

3 2


Output

9


Input

3 200


Output

10813692


Input

100000 100000


Output

742202979
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int K = input.nextInt();
		long mod = (long)(1e9+7);
		long[] gcdPerNum = new long[K+1];
		long answer = 0;
		for (int curGCD = K; curGCD>=1; curGCD--) {
			long base = K/curGCD;
			gcdPerNum[curGCD] = FastExp(base,N,mod);
			for (int OVERCNT = 2*curGCD; OVERCNT <= K; OVERCNT+=curGCD) {
				gcdPerNum[curGCD]-=gcdPerNum[OVERCNT];
				gcdPerNum[curGCD]%=mod;
				if (gcdPerNum[curGCD]<0) gcdPerNum[curGCD]+=mod;
			}
			answer+=gcdPerNum[curGCD]*curGCD;
			answer%=mod;
		}
		System.out.println(answer);
	}
	public static long FastExp(long base, long exp, long mod) {
		String Binary = Binary(exp);
		long[] mods = new long[Binary.length()];
		mods[0] = base%mod;
		long FinalProduct = 1;
		for (int i = 1; i < mods.length; i++) {
			mods[i] = ((mods[i-1]%mod)*(mods[i-1]%mod))%mod;
		}
		for (int i = 0; i < Binary.length(); i++) {
			if (Binary.charAt(i)=='1') {
				FinalProduct*=mods[Binary.length()-i-1];
				FinalProduct%=mod;
			}
		}
		return FinalProduct;
	}
	public static String Binary(long exp) {
		String answer = "";
		int length = 0;
		for (int i = 0;;i++) {
			if (Math.pow(2, i)>exp) {
				length=i;
				break;
			}
		}
		for (int i = length-1; i >= 0; i--) {
			if (Math.pow(2, i)<=exp) {
				answer+="1";
				exp-=Math.pow(2, i);
			}else {
				answer+="0";
			}
		}
		return answer;
	}
}
