import java.util.*;
class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No");


    }
} import java.util.*; util.* java class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No");


    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No");


    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No");


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No"); c[2]==c[3]&&c[4]==c[5] c[2]==c[3] c[2] c 2 c[3] c 3 c[4]==c[5] c[4] c 4 c[5] c 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 System.out System System.out "No" String args[] args
import java.util.*;
class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        if(c[2]==c[3]&&c[4]==c[5]){
            System.out.println("Yes");
        }
        else System.out.println("No");


    }
}