defmodule Main do def can_pair_txt(a, b) when a < b, do: "YES" def can_pair_txt(_, _), do: "NO" def remain_num(a, b), do: abs((a + 1) - b) def main do [a, b] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1) IO.puts can_pair_txt(a, b) IO.puts remain_num(a, b) end end