#include"iostream"
using namespace std;
int main()
{
int n;
cin >> n;
int* num = new int[n];
for (int i = 0; i < n; i++)
{
cin >> num[i];
}
int a = 0;
for (int i = 0; i < n; i++)
{
for (int x = 0; x < n ; x++)
{
int sum = num[i] + num[x];
if (sum % 3 == 0)
{
a++;
}
}
}
switch (a)
{
case 0:
cout << "No";
break;
default:
cout << "Yes";
break;
}
return 0;
}