Ichthyology#4526

Ichthyology

1 second
256 megabytes
Medium

Scientists at the Nearsea Institute of Linguistic Ichthyology study the language of fish. They have identified several specific sounds that some fish can make and assigned Latin letters to represent them. Then, they recorded underwater sounds and used advanced pattern recognition software to convert the recordings into strings of letters.

They hypothesize that a particular substring of letters may have some meaning in the fish language (i.e., act as a word), and so they want to count how many times that substring can appear as non-overlapping occurrences in the record.

Given two strings and , determine the minimum and maximum possible number of non-overlapping occurrences of in .

For example, if W = abab and T = ababbbabababab, the string can be interpreted as (abab)bb(abab)(abab) (giving occurrences) or as (abab)bbab(abab)ab (giving occurrences). Thus, the minimal number is and the maximum is .

Input

The first line contains the string (1 \leq |W| \leq 100). The second line contains the string (1 \leq |T| \leq 1000). Both and contain only lowercase Latin letters.

Output

Output two integers: the minimum and maximum number of non-overlapping occurrences of in .

Examples

Example

Input
abab
ababbbabababab
Output
2 3

Example 1

Loading
Loading

Note

In the sample, if you match W = abab greedily from left to right in T = ababbbabababab, you get occurrences: . If you delay one match, you get only occurrences. Thus, the answer is .