import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	}

	void calc() {
	}

	void showResult() {
	}

} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream import java.io.*; io.* java import java.math.BigDecimal; BigDecimal java.math import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	}

	void calc() {
	}

	void showResult() {
	}

} Main public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) Main ins = new Main(in); ins new Main(in) ins.calc() ins.calc ins ins.showResult() ins.showResult ins String[] args args Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	} Main {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	} String S = in.readLine(); S in.readLine() in.readLine in if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		} (S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5)) (S.charAt(2) == S.charAt(3)) S.charAt(2) S.charAt S 2 S.charAt(3) S.charAt S 3 (S.charAt(4)== S.charAt(5)) S.charAt(4) S.charAt S 4 S.charAt(5) S.charAt S 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" BufferedReader in in void calc() {
	} calc {
	} void showResult() {
	} showResult {
	} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	}

	void calc() {
	}

	void showResult() {
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	}

	void calc() {
	}

	void showResult() {
	}

} Main
import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String S = in.readLine();
		if((S.charAt(2) == S.charAt(3)) && (S.charAt(4)== S.charAt(5))) {
			System.out.println("Yes");
		}else {
			System.out.println("No");			
		}
	}

	void calc() {
	}

	void showResult() {
	}

}
