For this Question: You had written M <b>identical</b> strings each of length N on a whiteboard. Your archenemy came to the classroom behind your back and erased all the M strings and replaced those M strings with a single string of length M*N. He confesses that he simply jumbled all the M strings into one. But you doubt him, so you want to check whether he is telling the truth.The first line of the input contains 2 integers N and M.
The next line contains a string of length N*M.
Constraints:
1 <= N*M <= 10<sup>5</sup>
A string of length N*M having lowercase english alphabets.Print "YES" if your friend is telling the truth, else print "NO".Sample Input:
3 2
abccab

Sample Output:
YES

Explaination:
You had written string "abc" twice one the board which when shuffled gives string abccab., I have written this Solution Code: def main():
    n, m = map(int, input().split())
    s = input()
    mp = {}
    for i in s:
        if i in mp:
            mp[i] += 1
        else:
            mp[i] = 1
    for i in mp:
        if mp[i] % m:
            print("NO")
            return
    print("YES")

if __name__ == "__main__":
    main()

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