import java.util.Scanner;

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

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