Problem:
Score : 100 points

Problem Statement

You are given a string S of length 3 consisting of a, b and c. Determine if S can be obtained by permuting abc.

Constraints

|S|=3

S consists of a, b and c.

Input

Input is given from Standard Input in the following format:

S

Output

If S can be obtained by permuting abc, print Yes; otherwise, print No.

Sample Input 1

bac

Sample Output 1

Yes

Swapping the first and second characters in bac results in abc.

Sample Input 2

bab

Sample Output 2

No

Sample Input 3

abc

Sample Output 3

Yes

Sample Input 4

aaa

Sample Output 4

No

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

// Amsal toro ma ba cheshm migaiim
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#define ll long long
int gcd(int a, int b) {return b == 0 ? a : gcd(b, a % b);}
using namespace std;
const int inf = -1e6;
const int minf = 1e9;
const int maxn = 1e5+10;
int a[maxn];
/*bool safe(int row , int col)
{
    for(int i =0 ; i < m ; i++)
    {
        if(a[row][i] == 1)
        {
            return false;
        }
    }
    for(int i = 0 ; i < n ; i++)
    {
        if(a[i][col] == 1)
        {
            return false;
        }
    }
    return true;
}*/
/*bool check(int num, int x){
    if(num%x==0)
        return false;
    else
        return true;
}*/
/*bool check(int a,int b,int c)
{
    int s[] = { a , b , c };
    sort(s , s+3);
    return (s[0]+s[1] > s[2]);
}*/ 
/*int n;
string  a, b, c;
stack <string> st;
void clear()
{
    while (!st.empty())
    {
        st.pop();
    }   
}
void cd()
{
    cin >> c;
    c += '/';
    if(c[0] == '/')
    {
        clear();
    }
    b = "";
    for(int i = 0 ; i < c.size() ; i++)
    {
        if( c[i] == '/' && b == "..")
        {
            st.pop();
            b = "";
        }
        else if(c[i] == '/' && b != "..")
        {
            st.push(b);
            b = "";
        }
        else if(c[i] != '/')
        {
            b += c[i];
        }
    }
}
void pwd ()
{
    cout << "/";
    stack <string> s;
    while (!s.empty())
    {
        s.push(st.top());
        st.pop();
    }   
    while(!s.empty())
    {
        b = s.top();
        s.pop();
        cout << b << "/";
        st.push(b);
    }
    cout << endl;
}
*/
const ll MOD = 998244353;

ll range = pow(2,32);
int32_t main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    int cnta = 0 , cntb = 0 , cntc = 0;
    int sz = s.size();
    for(int i = 0 ; i < sz ; i++)
    {
        if(s[i] == 'a')
        {
            cnta++;
        }
        if(s[i] == 'b')
        {
            cntb++;
        }
        if(s[i] == 'c')
        {
            cntc++;
        }
    }
    if(cnta > 0 && cntb > 0 && cntc > 0)
    {
        cout << "YES" << endl;
    }
    else
    {
        cout << "NO" << endl;
    }
    
    return 0;
}