import java.util.Scanner

/**
 * Created by sonetsuyoshi on 2015/12/16.
 */

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt
  val a = Array.fill(n)(sc.nextInt)


  def run(): Boolean = {
    val max = a.max
    val min = a.min

    if(min < 0) false
    else if(max == 0) true
    else {
      val id = a.indexOf(max)
      for(i <- 1 to n) {
        a((id + i) % n) -= i
      }
      run()
    }
  }

  if(run()) println("YES")
  else println("NO")

}
