N = int(input()) A = list(map(int, input().split())) X = int(input()) print("Yes") ans = [[X]*N for _ in range(N)] for a in ans: print(*a)