defmodule Main do def main do 1..2 |> Enum.map(fn _ -> IO.read(:line) |> String.split() |> Enum.map(&String.to_integer/1) end) |> solve |> IO.puts() end defp solve([[_, a], x]) do cond do (x |> Enum.sum()) / (x |> length) == a -> "YES" true -> "NO" end end end