import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	} main {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan String[] split = s.split(""); split s.split("") s.split s "" if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		} split[2].equals(split[3]) split[2].equals split[2] split 2 split[3] split 3 {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		} if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			} split[4].equals(split[5]) split[4].equals split[4] split 4 split[5] split 5 {
				System.out.print("Yes");
				return;
			} System.out.print("Yes") System.out.print System.out System System.out "Yes" return; 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) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String[] split = s.split("");
		
		if(split[2].equals(split[3])) {
			if(split[4].equals(split[5])) {
				System.out.print("Yes");
				return;
			}
		}
		System.out.print("No");
		
	}

}
