import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	}

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

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	}

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

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	} main {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

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

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	}

} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String str = scanner.next();

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

		scanner.close();
	}

}
