import java.util.Scanner;

/**
 * @author yoshizaki
 *
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        String s = scanner.next();
        String ans = "Yes";
        if(s.charAt(2) != s.charAt(3))ans = "No";
        if(s.charAt(4) != s.charAt(5))ans = "No";
        System.out.println(ans);
    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        String s = scanner.next();
        String ans = "Yes";
        if(s.charAt(2) != s.charAt(3))ans = "No";
        if(s.charAt(4) != s.charAt(5))ans = "No";
        System.out.println(ans);
    }

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

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

} Main
import java.util.Scanner;

/**
 * @author yoshizaki
 *
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        String s = scanner.next();
        String ans = "Yes";
        if(s.charAt(2) != s.charAt(3))ans = "No";
        if(s.charAt(4) != s.charAt(5))ans = "No";
        System.out.println(ans);
    }

}
