defmodule Main do def main do n = IO.gets("") |> String.trim |> String.to_integer m = :math.sqrt(8 * n + 1) k = trunc(m) ans = cond do k == m -> "Yes\n#{div(k, 2)}" true -> "No" end IO.puts ans end end