n = int(input())
x = list(map(int, input().split()))
if x[n-1]%10==0:
print("Yes")
else:
print("No")
963A - Alternating Sum | 1191B - Tokitsukaze and Mahjong |
1612G - Max Sum Array | 1459B - Move and Turn |
1006F - Xor-Paths | 706C - Hard problem |
304C - Lucky Permutation Triple | 1301C - Ayoub's function |
38E - Let's Go Rolling | 171G - Mysterious numbers - 2 |
1183C - Computer Game | 400C - Inna and Huge Candy Matrix |
417A - Elimination | 222A - Shooshuns and Sequence |
1736A - Make A Equal to B | 1736B - Playing with GCD |
887C - Solution for Cube | 1737C - Ela and Crickets |
1741C - Minimize the Thickness | 1741A - Compare T-Shirt Sizes |
1741D - Masha and a Beautiful Tree | 109B - Lucky Probability |
1741B - Funny Permutation | 1741E - Sending a Sequence Over the Network |
344B - Simple Molecules | 370A - Rook Bishop and King |
546E - Soldier and Traveling | 1741G - Kirill and Company |
1200B - Block Adventure | 1088B - Ehab and subtraction |