import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	} main {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String ans[] = { "Yes", "No" }; ans { "Yes", "No" } "Yes" "No" String s = sc.next(); s sc.next() sc.next sc int an = 0; an 0 sc.close() sc.close sc an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1) an ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1) (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) s.charAt(2) == s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 s.charAt(4) == s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 0 1 System.out.println(ans[an]) System.out.println System.out System System.out ans[an] ans an String args[] args public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String ans[] = { "Yes", "No" };
		String s = sc.next();
		int an = 0;
		sc.close();
		an = ((s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? 0 : 1);
		System.out.println(ans[an]);
	}
}
