import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] str = sc.next().split(""); str sc.next().split("") sc.next().split sc.next() sc.next sc "" System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No") System.out.println System.out System System.out str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No" str[2].equals(str[3])&& str[4].equals(str[5]) str[2].equals(str[3]) str[2].equals str[2] str 2 str[3] str 3 str[4].equals(str[5]) str[4].equals str[4] str 4 str[5] str 5 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] str = sc.next().split("");
		System.out.println(str[2].equals(str[3])&& str[4].equals(str[5]) ? "Yes": "No");
	}
}
