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 s1 = readStr () val s2 = readStr () fun isSatOrSun s = s = "Sat" orelse s = "Sun" val ans = if isSatOrSun s1 andalso isSatOrSun s2 then "8/33" else if isSatOrSun s1 then "8/32" else "8/31" in print (ans ^ "\n") end