import java.util.Scanner;

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

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = null;

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = null;

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = null;

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = null; s null s = sc.nextLine() s sc.nextLine() sc.nextLine sc String array[] = s.split(""); array s.split("") s.split s "" if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		} array[2].equals(array[3]) && array[4].equals(array[5]) array[2].equals(array[3]) array[2].equals array[2] array 2 array[3] array 3 array[4].equals(array[5]) array[4].equals array[4] array 4 array[5] array 5 {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
				System.out.print("No");
		} System.out.print("No") System.out.print System.out System System.out "No" String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = null;

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = null;

		s = sc.nextLine();
		String array[] = s.split("");

		if(array[2].equals(array[3]) && array[4].equals(array[5])){
			System.out.println("Yes");
		}else{
				System.out.print("No");
		}
	}
} Main
import java.util.Scanner;

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

		s = sc.nextLine();
		String array[] = s.split("");

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