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# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;

class AtCoder
{
    static void Main()
    {
        string[] str = Console.ReadLine().Split(' ');
        int[] nums = new int[3];
        nums[0] = Int32.Parse(str[0]);
        nums[1] = Int32.Parse(str[1]);
        nums[2] = Int32.Parse(str[2]);//3つめの数字
        for (int i = 0; i < nums.Length - 1; i++)
        {
            for (int j = 1; j < nums.Length; j++)
            {
                if (nums[j] < nums[i])
                {
                    int temp = nums[j];
                    nums[j] = nums[i];
                    nums[i] = temp;
                }
            }
        }

        if (nums[0] % 2 == 0) // num1偶
        {
            if (nums[1] % 2 == 0) //num2 偶
            {
                if (nums[2] % 2 == 0) //num3 偶
                {//偶偶偶
                    Console.WriteLine(((nums[2] - nums[0]) + (nums[2] - nums[1])) / 2);
                }
                else//偶偶奇
                    Console.WriteLine((1 + (nums[2] - nums[0] + 1) + (nums[2] - nums[1] + 1)) / 2);
            }
            else
            {
                if (nums[2] % 2 == 0) //num3 偶
                {//偶奇偶
                    Console.WriteLine((1+ (nums[2]+1 - nums[0]+1) + (nums[2]+1 - nums[1])) / 2);
                }
                else//偶奇奇
                    Console.WriteLine((1 + (nums[2]+1 - nums[0]) + (nums[2]+1 - nums[1] + 1)) / 2);
            }
        }
        else //num1 奇
        {
            if (nums[1] % 2 == 0) //num2 偶
            {
                if (nums[2] % 2 == 0) //num3 偶
                {//奇偶偶
                    Console.WriteLine((1+(nums[2]+1 - nums[0]) + (nums[2] - nums[1]+1)) / 2);
                }
                else//奇偶奇
                    Console.WriteLine((1 + (nums[2]+1 - nums[0] + 1) + (nums[2] - nums[1] + 1)) / 2);
            }
            else
            {
                if (nums[2] % 2 == 0) //num3 偶
                {//奇奇偶
                    Console.WriteLine((1+(nums[2] - nums[0]+1) + (nums[2] - nums[1]+1)) / 2);
                }
                else//奇奇奇
                    Console.WriteLine(((nums[2] - nums[0]) + (nums[2] - nums[1])) / 2);
            }
        }
    }
}