import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9+7;

void main() {
    auto S = readln.chomp;
    if (S.canFind("ABC") ||
        S.canFind("ACB") ||
        S.canFind("BAC") ||
        S.canFind("BCA") ||
        S.canFind("CAB") ||
        S.canFind("CBA")) {
        writeln("Yes");
    } else {
        writeln("No");
    }
}
