import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;



public class Main {
    public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    }
} import java.io.*; io.* java import java.math.*; math.* java import java.security.*; security.* java import java.text.*; text.* java import java.util.*; util.* java import java.util.concurrent.*; concurrent.* java.util import java.util.function.*; function.* java.util import java.util.regex.*; regex.* java.util import java.util.stream.*; stream.* java.util import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; public class Main {
    public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    }
} Main public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    } main {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    } try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       } catch(Exception e)
       {
           return;
       } Exception e {
           return;
       } return; {
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No"); (s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)) (s.charAt(2)==s.charAt(3)) s.charAt(2) s.charAt s 2 s.charAt(3) s.charAt s 3 (s.charAt(4)==s.charAt(5)) s.charAt(4) s.charAt s 4 s.charAt(5) s.charAt s 5 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" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    }
} Main
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;



public class Main {
    public static void main(String[] args) throws IOException {
       try{
           Scanner sc=new Scanner(System.in);
           String s=sc.nextLine();
           if((s.charAt(2)==s.charAt(3)) && (s.charAt(4)==s.charAt(5)))
           System.out.println("Yes");
           else
           System.out.println("No");
       }
       catch(Exception e)
       {
           return;
       }
    }
}
