import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner String three = S.substring(2,3); three S.substring(2,3) S.substring S 2 3 String four = S.substring(3,4); four S.substring(3,4) S.substring S 3 4 String five = S.substring(4,5); five S.substring(4,5) S.substring S 4 5 String six = S.substring(5,6); six S.substring(5,6) S.substring S 5 6 if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} three.equals(four) && five.equals(six) three.equals(four) three.equals three four five.equals(six) five.equals five six {
			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 scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.next();
		
		String three = S.substring(2,3);
		String four = S.substring(3,4);
		String five = S.substring(4,5);
		String six = S.substring(5,6);
		
		if(three.equals(four) && five.equals(six)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}
