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.*;

public class Main {
    static int MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        
        // ans: 要素が全て1以上k以下の長さnの数列の、gcdの総和
        long ans = 0;
        
        // 全数列のgcdを実際に計算するのは間に合わない
        // -> gcd=x(1<=x<=k)になる数列のパターン数を数える。
        
        // f(x) = gcd=xになる数列のパターン数
        // -> ans = 1*f(1) + 2*f(2) + ... + k*f(k)
        long[] f = new long[k+1];
        
        // f(x)を降順に数え上げる。
        // ex. k=12
        // f(12) <- [12,12,...,12]
        // ...
        // f(7) <- [7,7,...,7]
            // -> f(12～7) = 1
        // f(6) = f(6の倍数) - f(12)
        // f(2) = f(2の倍数) - f(4) - f(6) - ... - f(12)
            // -> f(x) = f(xの倍数) - f(2*x) - f(3*x) - ...
        for (int i = k; i >= 1; i--) {
            long baisuu = modpow((k / i), n);
            
            long tmp = 0;
            for (int j = 2 * i; j <= k; j += i) {
                tmp += f[j];
                tmp %= MOD;
            }
            
            f[i] = baisuu - tmp;
            if (f[i] < 0) {
                f[i] += MOD;
            }
        }
        
        for (int i = 1; i <= k; i++) {
            // System.out.println(f[i]);
            ans += f[i] * i;
            ans %= MOD;
        }
        System.out.println(ans);
    }
    
    public static long modpow(long a, long n) {
        long res = 1;
        while (n > 0) {
            long tmp = n & 1;
            if (tmp > 0) res = res * a % MOD;
            a = a * a % MOD;
            n >>= 1;
        }
        return res;
    }
}