import java.util.*;

public class Main {

	
	// test #A
//	public static void main(String args[]) {
//		System.out.println("staring #1");
//		Scanner sc = new Scanner(System.in);
//		
//		int a = sc.nextInt();
//		
//		int b = sc.nextInt();
//		int c = sc.nextInt();
//		String s = sc.next();
//		
//		System.out.println(a+b+c+" "+s);
//		sc.close();
//	}

	// test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	}

	static void log(String s) {
		System.out.println(s);
	}

	static void log(int i) {
		System.out.println(i);
	}
	
} import java.util.*; util.* java public class Main {

	
	// test #A
//	public static void main(String args[]) {
//		System.out.println("staring #1");
//		Scanner sc = new Scanner(System.in);
//		
//		int a = sc.nextInt();
//		
//		int b = sc.nextInt();
//		int c = sc.nextInt();
//		String s = sc.next();
//		
//		System.out.println(a+b+c+" "+s);
//		sc.close();
//	}

	// test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	}

	static void log(String s) {
		System.out.println(s);
	}

	static void log(int i) {
		System.out.println(i);
	}
	
} Main // test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc char array[] = input.toCharArray(); array input.toCharArray() input.toCharArray input boolean like = false; like false if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true; (array[2] == array[3]) && (array[4]==array[5] ) (array[2] == array[3]) array[2] array 2 array[3] array 3 (array[4]==array[5] ) array[4] array 4 array[5] array 5 like = true like true log( like ? "Yes" : "No" ) log like ? "Yes" : "No" like "Yes" "No" sc.close() sc.close sc String args[] args static void log(String s) {
		System.out.println(s);
	} log {
		System.out.println(s);
	} System.out.println(s) System.out.println System.out System System.out s String s s static void log(int i) {
		System.out.println(i);
	} log {
		System.out.println(i);
	} System.out.println(i) System.out.println System.out System System.out i int i i public class Main {

	
	// test #A
//	public static void main(String args[]) {
//		System.out.println("staring #1");
//		Scanner sc = new Scanner(System.in);
//		
//		int a = sc.nextInt();
//		
//		int b = sc.nextInt();
//		int c = sc.nextInt();
//		String s = sc.next();
//		
//		System.out.println(a+b+c+" "+s);
//		sc.close();
//	}

	// test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	}

	static void log(String s) {
		System.out.println(s);
	}

	static void log(int i) {
		System.out.println(i);
	}
	
} public class Main {

	
	// test #A
//	public static void main(String args[]) {
//		System.out.println("staring #1");
//		Scanner sc = new Scanner(System.in);
//		
//		int a = sc.nextInt();
//		
//		int b = sc.nextInt();
//		int c = sc.nextInt();
//		String s = sc.next();
//		
//		System.out.println(a+b+c+" "+s);
//		sc.close();
//	}

	// test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	}

	static void log(String s) {
		System.out.println(s);
	}

	static void log(int i) {
		System.out.println(i);
	}
	
} Main
import java.util.*;

public class Main {

	
	// test #A
//	public static void main(String args[]) {
//		System.out.println("staring #1");
//		Scanner sc = new Scanner(System.in);
//		
//		int a = sc.nextInt();
//		
//		int b = sc.nextInt();
//		int c = sc.nextInt();
//		String s = sc.next();
//		
//		System.out.println(a+b+c+" "+s);
//		sc.close();
//	}

	// test #1  0322
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		String input = sc.next();		
		
		char array[] = input.toCharArray();
		
		boolean like = false;
		
		if ( (array[2] == array[3]) && (array[4]==array[5] ) )
			like = true;
		
		
		log( like ? "Yes" : "No" );
		sc.close();
	}

	static void log(String s) {
		System.out.println(s);
	}

	static void log(int i) {
		System.out.println(i);
	}
	
}
