object Main {

  import scala.math._

  def main(args: Array[String]) {

    val sc = new java.util.Scanner(System.in)

    val n = sc.nextInt()
    val arr = Array.fill(n)(sc.nextInt())

    if (check(arr)) println("YES")
    else println("NO")

  }
  def check(arr: Array[Int]): Boolean = {
    val n = arr.length
    def f(arr: Array[Int]): Boolean = {
      def calc(idx: Int, max_idx: Int): Int = {
        if (idx-max_idx > 0 ) arr(idx) - (idx - max_idx)
        else arr(idx)-(n + idx - max_idx)
      }
      def is_all_0(arr: Array[Int]): Boolean = {
        if (arr.filter(_ != 0).isEmpty) true
        else false
      }
      def exist_not_positive(arr: Array[Int]): Boolean = {
        if (arr.filter(_ < 1).length > 0) true
        else false
      }
      val max_idx = (0 until n).toList.maxBy(arr(_))
      val new_arr = (0 until n).toArray.map(calc(_, max_idx))

      if (is_all_0(new_arr)) true
      else if (exist_not_positive(new_arr)) false
      else f(new_arr)
    }
    f(arr)
  }
}