import java.util.*;

class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        String a = sc.next();
        if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No");
    }
}





 import java.util.*; util.* java class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        String a = sc.next();
        if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No");
    }
} Main private static Scanner sc; sc public static void main(final String[] args) {
        sc = new Scanner(System.in);
        String a = sc.next();
        if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No");
    } main {
        sc = new Scanner(System.in);
        String a = sc.next();
        if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No");
    } sc = new Scanner(System.in) sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No"); a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)) a.substring(2,3).equals(a.substring(3,4)) a.substring(2,3).equals a.substring(2,3) a.substring a 2 3 a.substring(3,4) a.substring a 3 4 a.substring(4,5).equals(a.substring(5,6)) a.substring(4,5).equals a.substring(4,5) a.substring a 4 5 a.substring(5,6) a.substring a 5 6 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" final String[] args args
import java.util.*;

class Main {
    private static Scanner sc;

    public static void main(final String[] args) {
        sc = new Scanner(System.in);
        String a = sc.next();
        if(a.substring(2,3).equals(a.substring(3,4)) && 
           a.substring(4,5).equals(a.substring(5,6)))System.out.println("Yes"); 
        else System.out.println("No");
    }
}






