import java.util.Scanner;

public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	}
} Main static Main instance = new Main(); instance new Main() public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	} main {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char[] str = scan.next().toCharArray(); str scan.next().toCharArray() scan.next().toCharArray scan.next() scan.next scan String result = "No"; result "No" if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		} str[2] == str[3] && str[4] == str[5] str[2] == str[3] str[2] str 2 str[3] str 3 str[4] == str[5] str[4] str 4 str[5] str 5 {
			result = "Yes";
		} result = "Yes" result "Yes" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	}
} public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	}
} Main
import java.util.Scanner;

public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値
		char[] str = scan.next().toCharArray();

		String result = "No";
		if (str[2] == str[3] && str[4] == str[5]) {
			result = "Yes";
		}

		System.out.println(result);
	}
}