import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	}

    private static void printBool(boolean answer) {
        System.out.println(answer ?  "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 s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	}

    private static void printBool(boolean answer) {
        System.out.println(answer ?  "Yes" : "No");
    }
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc char three = s.charAt(2); three s.charAt(2) s.charAt s 2 char four = s.charAt(3); four s.charAt(3) s.charAt s 3 char five = s.charAt(4); five s.charAt(4) s.charAt s 4 char six = s.charAt(5); six s.charAt(5) s.charAt s 5 boolean answer = false; answer false if (three == four && five == six) {
			answer = true;
		} three == four && five == six three == four three four five == six five six {
			answer = true;
		} answer = true answer true printBool(answer) printBool answer String[] args args private static void printBool(boolean answer) {
        System.out.println(answer ?  "Yes" : "No");
    } printBool {
        System.out.println(answer ?  "Yes" : "No");
    } System.out.println(answer ?  "Yes" : "No") System.out.println System.out System System.out answer ?  "Yes" : "No" answer "Yes" "No" boolean answer answer public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	}

    private static void printBool(boolean answer) {
        System.out.println(answer ?  "Yes" : "No");
    }
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	}

    private static void printBool(boolean answer) {
        System.out.println(answer ?  "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();

		char three = s.charAt(2);
		char four = s.charAt(3);
		char five = s.charAt(4);
		char six = s.charAt(5);

		boolean answer = false;
		if (three == four && five == six) {
			answer = true;
		}

		printBool(answer);
	}

    private static void printBool(boolean answer) {
        System.out.println(answer ?  "Yes" : "No");
    }
}