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

public class Main {
	 
	public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	}
 
	private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io public class Main {
	 
	public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	}
 
	private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	}
} Main public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	} run {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	} PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		} s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6)) s.substring(2,3).equals(s.substring(3,4)) s.substring(2,3).equals s.substring(2,3) s.substring s 2 3 s.substring(3,4) s.substring s 3 4 s.substring(4,5).equals(s.substring(5,6)) s.substring(4,5).equals s.substring(4,5) s.substring s 4 5 s.substring(5,6) s.substring s 5 6 {
			out.println("Yes");
		} out.println("Yes") out.println out "Yes" {
			out.println("No");
		} out.println("No") out.println out "No" out.flush() out.flush out br.close() br.close br public class Main {
	 
	public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	}
 
	private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	}
} public class Main {
	 
	public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	}
 
	private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {
	 
	public static void main(String[] args) throws IOException {
		Main main = new Main();
		main.run();
	}
 
	private void run() throws IOException {
		PrintWriter out = new PrintWriter(System.out);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		if(s.substring(2,3).equals(s.substring(3,4)) && s.substring(4,5).equals(s.substring(5,6))) {
			out.println("Yes");
		}else {
			out.println("No");
		}
		out.flush();
		br.close();
	}
}