import java.io.PrintWriter;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author i.mekni
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    }

} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    }

} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    } main {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    } Scanner read = new Scanner(System.in); read new Scanner(System.in) PrintWriter write = new PrintWriter(System.out); write new PrintWriter(System.out) String t = read.nextLine(); t read.nextLine() read.nextLine read if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No"); t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5) t.charAt(2)==t.charAt(3) t.charAt(2) t.charAt t 2 t.charAt(3) t.charAt t 3 t.charAt(4)==t.charAt(5) t.charAt(4) t.charAt t 4 t.charAt(5) t.charAt t 5 write.println("Yes") write.println write "Yes" write.println("No") write.println write "No" write.close() write.close write String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    }

} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    }

} Main
import java.io.PrintWriter;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author i.mekni
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Scanner read = new Scanner(System.in);

        PrintWriter write = new PrintWriter(System.out);

        String t = read.nextLine();
        if(t.charAt(2)==t.charAt(3) && t.charAt(4)==t.charAt(5)) write.println("Yes");
        else  write.println("No");
        write.close();
    }

}
