import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

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

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    } main {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} (input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5)) (input.charAt(2)==input.charAt(3)) input.charAt(2) input.charAt input 2 input.charAt(3) input.charAt input 3 (input.charAt(4)==input.charAt(5)) input.charAt(4) input.charAt input 4 input.charAt(5) input.charAt input 5 {
			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" scan.close() scan.close scan String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    }
} public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();

		if ((input.charAt(2)==input.charAt(3)) &&
			(input.charAt(4)==input.charAt(5))) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	    scan.close();	

    }
}