Problem:
Score : 200 points

Problem Statement

Let w be a string consisting of lowercase letters.
We will call w beautiful if the following condition is satisfied:

Each lowercase letter of the English alphabet occurs even number of times in w.

You are given the string w. Determine if w is beautiful.

Constraints

1 \leq |w| \leq 100

w consists of lowercase letters (a-z).

Input

The input is given from Standard Input in the following format:

w

Output

Print Yes if w is beautiful. Print No otherwise.

Sample Input 1

abaccaba

Sample Output 1

Yes

a occurs four times, b occurs twice, c occurs twice and the other letters occur zero times.

Sample Input 2

hthth

Sample Output 2

No

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

#include <bits/stdc++.h>
using namespace std;

int main() {
 
  string w;
  cin >> w;
  int N = w.size();
  sort(w.begin(), w.end());
  
  int cnt = 1;
  for(int i = 1; i < N; i++){
    if(w.at(i - 1) == w.at(i)){
      cnt++;
      if(i == N - 1){
        if(cnt % 2 == 0){
          cout << "Yes" << endl;
        }
        else{
          cout << "No" << endl;
        }
      }
    }
    
    else{
      if(cnt % 2 == 0){
        cnt = 1;
        continue;
      }
      else{
        cout << "No" << endl;
        break;
      }
    }
  }
}