import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	}
} import java.math.BigDecimal; BigDecimal java.math import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Objects; Objects java.util import java.util.Scanner; Scanner java.util import java.util.regex.Pattern; Pattern java.util.regex public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	} main {

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	}
} Main
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		
		if(Objects.equals(str.charAt(2), str.charAt(3)) && Objects.equals(str.charAt(4), str.charAt(5))) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		};
		
		
	}
}