fun readInt () = valOf (TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn) fun readStr () = let fun scan reader stream = SOME (StringCvt.splitl (not o Char.isSpace) reader (StringCvt.skipWS reader stream)) in valOf (TextIO.scanStream scan TextIO.stdIn) end val () = let val n = readInt () val s = readStr () val ans = if String.isSubstring "404" s then "Found" else "NotFound" in print (ans ^ "\n") end