{"raw_statement":[{"iden":"problem statement","content":"Consider sequences ${A_1,...,A_N}$ of length $N$ consisting of integers between $1$ and $K$ (inclusive).\nThere are $K^N$ such sequences. Find the sum of $\\gcd(A_1, ..., A_N)$ over all of them.\nSince this sum can be enormous, print the value modulo $(10^9+7)$.\nHere $\\gcd(A_1, ..., A_N)$ denotes the greatest common divisor of $A_1, ..., A_N$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 10^5$\n*   $1 \\leq K \\leq 10^5$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$"},{"iden":"sample input 1","content":"3 2"},{"iden":"sample output 1","content":"9\n\n$\\gcd(1,1,1)+\\gcd(1,1,2)+\\gcd(1,2,1)+\\gcd(1,2,2)$ $+\\gcd(2,1,1)+\\gcd(2,1,2)+\\gcd(2,2,1)+\\gcd(2,2,2)$ $=1+1+1+1+1+1+1+2=9$\nThus, the answer is $9$."},{"iden":"sample input 2","content":"3 200"},{"iden":"sample output 2","content":"10813692"},{"iden":"sample input 3","content":"100000 100000"},{"iden":"sample output 3","content":"742202979\n\nBe sure to print the sum modulo $(10^9+7)$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}