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

public class Main {
	private static final int LEN = 6;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	private static final int LEN = 6;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	}
} Main private static final int LEN = 6; LEN 6 public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] s = br.readLine().split(""); s br.readLine().split("") br.readLine().split br.readLine() br.readLine br "" if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		} s != null s null {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		} if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			} s.length == LEN s.length s s.length LEN {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			} System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No") System.out.println System.out System System.out s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No" s[2].equals(s[3]) && s[4].equals(s[5]) s[2].equals(s[3]) s[2].equals s[2] s 2 s[3] s 3 s[4].equals(s[5]) s[4].equals s[4] s 4 s[5] s 5 "Yes" "No" String[] args args public class Main {
	private static final int LEN = 6;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	}
} public class Main {
	private static final int LEN = 6;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	private static final int LEN = 6;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] s = br.readLine().split("");
		if (s != null) {
			if (s.length == LEN) {
				System.out.println(s[2].equals(s[3]) && s[4].equals(s[5]) ? "Yes" : "No");
			}
		}
	}
}
