import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] array = in.readLine().split(""); array in.readLine().split("") in.readLine().split in.readLine() in.readLine in "" System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No") System.out.println System.out System System.out array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No" array[2].equals(array[3]) 
                       && array[4].equals(array[5]) array[2].equals(array[3]) array[2].equals array[2] array 2 array[3] array 3 array[4].equals(array[5]) array[4].equals array[4] array 4 array[5] array 5 "Yes" "No" String[] args args public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  }
} public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] array = in.readLine().split("");
    System.out.println(array[2].equals(array[3]) 
                       && array[4].equals(array[5])?"Yes":"No");
  }
}