ZYB loves binary strings (strings that only contains `0` and`1`’). And he loves equal binary strings more, where the number of `0`and the number of `1` in the string are equal.

ZYB wants to choose a substring from an original string `T` so that it is an equal binary stringwith the longest length possible. He also wants to choose a subsequence of `T` which meets the same requirements.

A string `v` is a substring of a string `w` if `v` is empty, or there are two integers `l` and `r` (1≤l≤r≤∣w∣) such that `v=wl*wl+1 ⋯wr` A string v is a subsequence of a string `w` if it can be derived from w by deleting any number (including zero) of characters without changing the order of the remaining characters.

For simplicity, you only need to output the maximum possible length. Note that the empty string is both a substring and a subsequence of any string.

The first line of the input contains a single integer `N` (1≤`N`≤100000)，the length of the original string `T`. The second line contains a binary string with exactly `N` characters, the original string `T`

Print two integers `A` and `B`, denoting the answer for substring and subsequence respectively.

8

0100101001

4 6

Solve A：map

Solve B：前缀和

s1[j]-s1[i-1] = s2[j]-s2[i-1]

s1[j]-s2[j] = s1[i-1] - s2[i-1]