n=int (input ())
cnt=[0 for i in range (3)]
for it in input (). split () :
cnt [int(it)-1]+=1
cnt=sorted (cnt)
ans="No"
if cnt[0]>=1 or (cnt[1]>=2 and cnt[2]>=2) or (cnt[1]>=1 and cnt[2]>=5):
ans="Yes"
print (ans)
bj1pbnQgKGlucHV0ICgpKSAKY250PVswIGZvciBpIGluIHJhbmdlICgzKV0KZm9yIGl0IGluIGlucHV0ICgpLiBzcGxpdCAoKSA6CiAgICBjbnQgW2ludChpdCktMV0rPTEKY250PXNvcnRlZCAoY250KSAKYW5zPSJObyIKaWYgY250WzBdPj0xIG9yIChjbnRbMV0+PTIgYW5kIGNudFsyXT49Mikgb3IgKGNudFsxXT49MSBhbmQgY250WzJdPj01KToKICAgIGFucz0iWWVzIgpwcmludCAoYW5zKQ==