CF79C Beaver

Description

After Fox Ciel got off a bus, she found that the bus she was on was a wrong bus and she lost her way in a strange town. However, she fortunately met her friend Beaver Taro and asked which way to go to her castle. Taro's response to her was a string $ s $ , and she tried to remember the string $ s $ correctly. However, Ciel feels $ n $ strings $ b_{1},b_{2},...\ ,b_{n} $ are really boring, and unfortunately she dislikes to remember a string that contains a boring substring. To make the thing worse, what she can remember is only the contiguous substring of $ s $ . Determine the longest contiguous substring of $ s $ that does not contain any boring string, so that she can remember the longest part of Taro's response.

Input Format

In the first line there is a string $ s $ . The length of $ s $ will be between $ 1 $ and $ 10^{5} $ , inclusive. In the second line there is a single integer $ n $ ( $ 1

Output Format

Output in the first line two space-separated integers $ len $ and $ pos $ : the length of the longest contiguous substring of $ s $ that does not contain any $ b_{i} $ , and the first position of the substring (0-indexed). The position $ pos $ must be between $ 0 $ and $ |s|-len $ inclusive, where $ |s| $ is the length of string $ s $ . If there are several solutions, output any.

Explanation/Hint

In the first sample, the solution is traight\_alon. In the second sample, the solution is an empty string, so the output can be «0 0», «0 1», «0 2», and so on. In the third sample, the solution is either nagio or oisii.