Company: Myntra_7may
Difficulty: medium
Digit Sum Substrings Problem Description Alex, an archaeologist, discovered an ancient scroll hidden deep within an old temple. This scroll contains a string of N digits. According to legend, the scroll reveals its secret if it can be split into two or more non-overlapping substrings, each having the same sum of digits. Every digit on the scroll must belong to exactly one of these substrings. For example, the string "12131" can be split into "121" and "31", where the sum of the digits in each substring is equal. Specifically, 1+2+1=4 and 3+1=4. Your objective is to determine if the string on the scroll meets the criteria for revealing the secret message. The input consists of two lines. The first line contains an integer N, representing the length of the string. The second line contains the string S, made up of N digits. Your program should print "YES" if the scroll holds the secret message, otherwise print "NO". Examples Example 1: Input: 3 124 Output: NO Explanation: The string "124"