import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] ch = sc.next().toCharArray(); ch sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean judge = false; judge false if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        } ch[2] == ch[3] && ch[4] == ch[5] ch[2] == ch[3] ch[2] ch 2 ch[3] ch 3 ch[4] == ch[5] ch[4] ch 4 ch[5] ch 5 {
            judge = true;
        } judge = true judge true System.out.println(judge ? "Yes" : "No") System.out.println System.out System System.out judge ? "Yes" : "No" judge "Yes" "No" String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.next().toCharArray();

        boolean judge = false;
        if(ch[2] == ch[3] && ch[4] == ch[5]){
            judge = true;
        }
        System.out.println(judge ? "Yes" : "No");
    }
}