import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	}
} Main public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	} main {
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<Character> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    } {
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    } list.add(s.charAt(i)) list.add list s.charAt(i) s.charAt s i if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    } list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5)) list.get(2).equals(list.get(3)) list.get(2).equals list.get(2) list.get list 2 list.get(3) list.get list 3 list.get(4).equals(list.get(5)) list.get(4).equals list.get(4) list.get list 4 list.get(5) list.get list 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" final String[] args args public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	}
} public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<Character> list = new ArrayList<>();

    for(int i = 0; i < s.length(); i++){
        list.add(s.charAt(i));

        //切り出した文字列を一文字ずつ出力
    }

    if(list.get(2).equals(list.get(3)) && list.get(4).equals(list.get(5))){
        System.out.println("Yes");
    }else{
        System.out.println("No");
    }

   
    
    
    
	}
}