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 5.4.1) (judge verdict: Runtime Error)

#include<stdio.h>

int acount;
int bcount;
int ccount;
int dec(char, char, int);

void main(int argc, char *argv[]){
    char buf[3];
    char abc[3] = "abc";
    int ok;
    int okcount;

    scanf("%c %c %c", &buf[0], &buf[1], &buf[2]);

    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 3; j++){
            ok = dec(abc[i], buf[j], i);
            if(ok == 1){
                okcount++;
                break;
            }
        }
    }

    if(okcount == 3){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
}

int dec(char a,char b, int i){
    if(a == b){
        if(i == 0, acount == 0){
            acount++;
            return 1;
        }else if(i == 1, bcount == 0){
            bcount++;
            return 1;
        }else if(i == 2, ccount == 0){
            ccount++;
            return 1;
        }else{
            return 0;
        }
    }else{
        return 0;
    }
}