import java.util.*;
import java.lang.*;
import java.io.*;
 
public class Main {
    public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	}
	
	public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
    public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	}
	
	public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    }
} Main public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	} main {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc System.out.println(myFunction(a)) System.out.println System.out System System.out myFunction(a) myFunction a String args[] args public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    } myFunction {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    } if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes"; s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) s.charAt(2) == s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 s.charAt(4) == s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 return "Yes"; "Yes" return "No"; "No" String s s public class Main {
    public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	}
	
	public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    }
} public class Main {
    public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	}
	
	public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    }
} Main
import java.util.*;
import java.lang.*;
import java.io.*;
 
public class Main {
    public static void main(String args[]) {
		 Scanner sc = new Scanner(System.in);
		 String a = sc.nextLine();
		 System.out.println(myFunction(a));
	}
	
	public static String myFunction(String s) {
		if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) return "Yes";
		return "No";
    }
}