
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] input = scanner.nextLine().toCharArray(); input scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner String result = "No"; result "No" if(input[2] == input[3] && input[4] == input[5]) result = "Yes"; input[2] == input[3] && input[4] == input[5] input[2] == input[3] input[2] input 2 input[3] input 3 input[4] == input[5] input[4] input 4 input[5] input 5 result = "Yes" result "Yes" System.out.println(result) System.out.println System.out System System.out result scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		char[] input = scanner.nextLine().toCharArray();
		String result = "No";
		if(input[2] == input[3] && input[4] == input[5]) result = "Yes";
		System.out.println(result);
		scanner.close();
	}

}
