import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.next(); str scan.next() scan.next scan String[] strs = str.split(""); strs str.split("") str.split str "" boolean flag = true; flag true if(!strs[2].equals(strs[3])) flag = false; !strs[2].equals(strs[3]) strs[2].equals(strs[3]) strs[2].equals strs[2] strs 2 strs[3] strs 3 flag = false flag false if(!strs[4].equals(strs[5])) flag = false; !strs[4].equals(strs[5]) strs[4].equals(strs[5]) strs[4].equals strs[4] strs 4 strs[5] strs 5 flag = false flag false if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} flag {
			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 public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String[] strs = str.split("");
		boolean flag = true;

		if(!strs[2].equals(strs[3])) flag = false;
		if(!strs[4].equals(strs[5])) flag = false;

		if (flag) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}