ans s =
  let [m,n] = map read $ splitBy ':' s :: [Double]
      ang_s = 360 / 12 * m + 360 / 12 / 60 * n
      ang_l = 6 * n
      diff = abs (ang_s - ang_l)
      d'   = if diff < 180 then diff else (360-diff)
  in
    if d' < 30
    then "alert"
    else if d' < 90
         then "warning"
         else "safe"
ans s =
  let [m,n] = map read $ splitBy ':' s :: [Double]
      ang_s = 360 / 12 * m + 360 / 12 / 60 * n
      ang_l = 6 * n
      diff = abs (ang_s - ang_l)
      d'   = if diff < 180 then diff else (360-diff)
  in
    if d' < 30
    then "alert"
    else if d' < 90
         then "warning"
         else "safe"
ans s =
  let [m,n] = map read $ splitBy ':' s :: [Double]
      ang_s = 360 / 12 * m + 360 / 12 / 60 * n
      ang_l = 6 * n
      diff = abs (ang_s - ang_l)
      d'   = if diff < 180 then diff else (360-diff)
  in
    if d' < 30
    then "alert"
    else if d' < 90
         then "warning"
         else "safe"