import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		sc.close();
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		sc.close();
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			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 c1 = s.charAt(2); c1 s.charAt(2) s.charAt s 2 char c2 = s.charAt(3); c2 s.charAt(3) s.charAt s 3 char c3 = s.charAt(4); c3 s.charAt(4) s.charAt s 4 char c4 = s.charAt(5); c4 s.charAt(5) s.charAt s 5 if(c1==c2&&c3==c4) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		} c1==c2&&c3==c4 c1==c2 c1 c2 c3==c4 c3 c4 {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		String s=sc.next();
		char c1 = s.charAt(2);
	    char c2 = s.charAt(3);
	    char c3 = s.charAt(4);		
	    char c4 = s.charAt(5);
		
		if(c1==c2&&c3==c4) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		sc.close();
	}

}
