
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	} Scanner sc  = new Scanner(System.in); sc new Scanner(System.in) String lines = sc.nextLine(); lines sc.nextLine() sc.nextLine sc int lengthLine = lines.length(); lengthLine lines.length() lines.length lines if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		} lengthLine == 6 lengthLine 6 {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		} String[] line = lines.split(""); line lines.split("") lines.split lines "" if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			} line[2].equals(line[3]) && line[4].equals(line[5]) line[2].equals(line[3]) line[2].equals line[2] line 2 line[3] line 3 line[4].equals(line[5]) line[4].equals line[4] line 4 line[5] line 5 {
				System.out.println("Yes");
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" {

				System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc  = new Scanner(System.in);
		String lines = sc.nextLine();
		int lengthLine = lines.length();

		if(lengthLine == 6) {
			String[] line = lines.split("");
			if(line[2].equals(line[3]) && line[4].equals(line[5]) ){
				System.out.println("Yes");
			}
			else {

				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}

	}

}
