import java.util.Scanner;

public class Main {

	private static final String STR_YES = "Yes";
	private static final String STR_NO = "No";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	private static final String STR_YES = "Yes";
	private static final String STR_NO = "No";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	}
} Main private static final String STR_YES = "Yes"; STR_YES "Yes" private static final String STR_NO = "No"; STR_NO "No" public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	} main {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc char s3 = str.charAt(2); s3 str.charAt(2) str.charAt str 2 char s4 = str.charAt(3); s4 str.charAt(3) str.charAt str 3 char s5 = str.charAt(4); s5 str.charAt(4) str.charAt str 4 char s6 = str.charAt(5); s6 str.charAt(5) str.charAt str 5 if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		} s3 == s4 && s5 == s6 s3 == s4 s3 s4 s5 == s6 s5 s6 {
			System.out.print(STR_YES);
		} System.out.print(STR_YES) System.out.print System.out System System.out STR_YES {
			System.out.print(STR_NO);
		} System.out.print(STR_NO) System.out.print System.out System System.out STR_NO String[] args args public class Main {

	private static final String STR_YES = "Yes";
	private static final String STR_NO = "No";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	}
} public class Main {

	private static final String STR_YES = "Yes";
	private static final String STR_NO = "No";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	}
} Main
import java.util.Scanner;

public class Main {

	private static final String STR_YES = "Yes";
	private static final String STR_NO = "No";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		sc.close();

		char s3 = str.charAt(2);
		char s4 = str.charAt(3);
		char s5 = str.charAt(4);
		char s6 = str.charAt(5);

		if (s3 == s4 && s5 == s6) {
			System.out.print(STR_YES);
		} else {
			System.out.print(STR_NO);
		}

	}
}
