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