Problem:
Score : 100 points

Problem Statement

Takahashi is participating in a programming contest, AXC001. He has just submitted his code to Problem A.

The problem has N test cases, all of which must be passed to get an AC verdict.

Takahashi's submission has passed M cases out of the N test cases.

Determine whether Takahashi's submission gets an AC.

Constraints

1 \leq N \leq 100

0 \leq M \leq N

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N M

Output

If Takahashi's submission gets an AC, print Yes; otherwise, print No.

Sample Input 1

3 3

Sample Output 1

Yes

All three test cases have been passed, so his submission gets an AC.

Sample Input 2

3 2

Sample Output 2

No

Only two out of the three test cases have been passed, so his submission does not get an AC.

Sample Input 3

1 1

Sample Output 3

Yes

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

#include <iostream>
#include <map>
#include <algorithm>
#include <cmath>
#define ll long long
#define mod 1000000007
using namespace std;

ll n, arr[10004];
map<ll, ll>mp;

ll fp(ll base, ll power)
{
    if (power == 0) return 1;
    ll ans = fp(base, power / 2);
    ans = (ans * ans) % mod;
    if (power % 2 != 0)
        ans = (ans * (base % mod)) % mod;
    return ans;
}

void get_max(ll key, ll val)
{
    map<ll, ll>::iterator it = mp.find(key);
    if (it == mp.end())
        mp.insert({ key,val });
    else
        it->second = max(it->second, val);
}

void get_factors(ll x)
{
    ll xx = x;
    bool prime = 1;
    for (int i = 2; i <= sqrt(x); i++)
    {
        if (xx % i == 0)
        {
            prime = 0;
            ll power = 0;
            while (xx % i == 0)
            {
                power++;
                xx /= i;
            }
            get_max(i, power);
        }
    }
    if (xx > 1)
        get_max(x, 1);
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> arr[i];
        get_factors(arr[i]);
    }
    ll lcm = 1, ans = 0;
    for (auto i : mp)
        lcm = ((lcm % mod) * fp(i.first, i.second)) % mod;
    for (int i = 0; i < n; i++)
        ans = (ans + ((lcm * fp(arr[i], mod - 2)) % mod)) % mod;
    cout << ans % mod << '\n';
    return 0;
}