import std.stdio, std.string, std.array, std.conv, std.algorithm;

void main() {
    auto t = readln.chomp.to!(dchar[]).sort!("a < b").group.array;
    writeln(t.length == 2 && t[0][1] == 2 && t[1][1] == 2 ? "Yes" : "No");
}