import java.util.Scanner;

class Main {

	static Scanner sc = new Scanner(System.in);

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

	static Scanner sc = new Scanner(System.in);

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

class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String a=sc.next();
		System.out.println((a.charAt(2)==a.charAt(3))&&(a.charAt(4)==a.charAt(5)) ? "Yes":"No");
	}
}