#!/usr/bin/env python3 import sys def main(): N = int(input()) A = list(map(int, input().split())) tot = 0 for aa in A[1:]: tot += (aa - A[0]) % N tot %= N print("Yes" if tot == 0 else "No") if __name__ == '__main__': main()