Submarine Identification

Time limit1sMemory limit128 MB

Problem

A submarine engine sound is represented as a string made from two unit sounds, 0 and 1.

The engine sound to identify is exactly the set of strings that match this pattern.

(100~1~|01)~

Here, x~ means one or more repetitions of the preceding expression x. Therefore, the whole pattern is a concatenation of one or more pieces, where each piece is either of the form 100~1~ or exactly 01. A 100~1~ piece means 1, followed by at least two 0s, followed by at least one 1.

Given a string of 0s and 1s, determine whether it belongs to this pattern.

Input

The first line contains a string S consisting only of 0 and 1. The length of S is at most 150.

Output

Print SUBMARINE if S belongs to the engine-sound pattern to identify. Otherwise, print NOISE.