import java.util.Scanner;

public class Main {

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

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} 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();

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

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

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

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} public class Main {

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

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

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

		char i2 = S.charAt(2);
		char i3 = S.charAt(3);
		char i4 = S.charAt(4);
		char i5 = S.charAt(5);

		if (i2 == i3 && i4 == i5) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
}
