Calculate the polynomial hash value (, ) for the suffix of length of . Then calculate the same hash value for the central substring of of length , i.e. for the substring .
Enter two numbers separated by space.
Tip: Use the rolling hash property of polynomial hashing.