Problem:
Score : 100 points

Problem Statement

Based on some criterion, Snuke divided the integers from 1 through 12 into three groups as shown in the figure below.
Given two integers x and y (1 ≤ x < y ≤ 12), determine whether they belong to the same group.

Constraints

x and y are integers.

1 ≤ x < y ≤ 12

Input

Input is given from Standard Input in the following format:

x y

Output

If x and y belong to the same group, print Yes; otherwise, print No.

Sample Input 1

1 3

Sample Output 1

Yes

Sample Input 2

2 4

Sample Output 2

No

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<stdio.h>
#include<string.h>
#include<string>
#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

vector<int>v1,v2,v3;

int main()
{
    int x,y;
    v1.push_back(1);
    v1.push_back(3);
    v1.push_back(5);
    v1.push_back(7);
    v1.push_back(8);
    v1.push_back(10);
    v1.push_back(12);
    v2.push_back(4);
    v2.push_back(6);
    v2.push_back(8);
    v2.push_back(11);
    while(scanf("%d %d", &x,&y)==2)
    {
        if( x==2 || y==2 ) printf("No\n");
        else if( binary_search(v1.begin(), v1.end(), x) && binary_search(v1.begin(), v1.end(), y))
        {
            printf("Yes\n");
        }
        else if( binary_search(v2.begin(), v2.end(), x) && binary_search(v2.begin(), v2.end(), y) )
        {
            printf("Yes\n");
        }
        else printf("No\n");
    }


    return 0;
}