import java.io.*;
import java.util.*;


public class Main {
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    }
} Main public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    } main {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s= scanner.next(); s scanner.next() scanner.next scanner boolean coffeeLike=true; coffeeLike true if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        } s.charAt(2)!=s.charAt(3) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 {
            coffeeLike=false;
        } coffeeLike=false coffeeLike false if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        } s.charAt(4)!=s.charAt(5) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 {
            coffeeLike=false;
        } coffeeLike=false coffeeLike false System.out.println(coffeeLike? "Yes" : "No") System.out.println System.out System System.out coffeeLike? "Yes" : "No" coffeeLike "Yes" "No" String[]args args public class Main {
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    }
} public class Main {
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    }
} Main
import java.io.*;
import java.util.*;


public class Main {
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s= scanner.next();
        boolean coffeeLike=true;
        if (s.charAt(2)!=s.charAt(3)){
            coffeeLike=false;
        }
        if (s.charAt(4)!=s.charAt(5)){
            coffeeLike=false;
        }
        System.out.println(coffeeLike? "Yes" : "No");
    }
}
