import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		
		String str=in.readLine();
		
		boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5);
		if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		
		String str=in.readLine();
		
		boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5);
		if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		

	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		
		String str=in.readLine();
		
		boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5);
		if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		

	} main {
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		
		String str=in.readLine();
		
		boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5);
		if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		

	} BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String str=in.readLine(); str in.readLine() in.readLine in boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5); equals str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5) str.charAt(2)==str.charAt(3) str.charAt(2) str.charAt str 2 str.charAt(3) str.charAt str 3 str.charAt(4)==str.charAt(5) str.charAt(4) str.charAt str 4 str.charAt(5) str.charAt str 5 if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} equals {
			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" String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		
		String str=in.readLine();
		
		boolean equals=str.charAt(2)==str.charAt(3)&&str.charAt(4)==str.charAt(5);
		if(equals) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		

	}

}
