
import java.util.Scanner;

class Main {

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

		String s = scanner.next();
		System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No");
    
        scanner.close();
	}
} import java.util.Scanner; Scanner java.util class Main {

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

		String s = scanner.next();
		System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No");
    
        scanner.close();
	}
} Main public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		String s = scanner.next();
		System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No");
    
        scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);

		String s = scanner.next();
		System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No");
    
        scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No") System.out.println System.out System System.out (s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No" (s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5) s.length() == 6 s.length() s.length s 6 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 "Yes" "No" scanner.close() scanner.close scanner String[] args args

import java.util.Scanner;

class Main {

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

		String s = scanner.next();
		System.out.println((s.length() == 6 && s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) ? "Yes" : "No");
    
        scanner.close();
	}
}