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

void main()
{
    auto s = cast(ubyte[])readln.chomp;
    (s[2] == s[3] && s[4] == s[5] ? "Yes" : "No").writeln;
}
