def main():
	N = int(input())
	A = list(map(int, input().split()))
	if N != 3:
		print("No")
		return

	val_set = set()
	for a in A:
		val_set.add(a)

	possible = True
	for i in range(1, N+1):
		if i not in val_set:
			possible = False
			break
	if possible:
		print("Yes")
	else:
		print("No")


if __name__ == '__main__':
	main()