import java.util.Scanner; 
import java.util.Arrays;

class Main{

 public static void main(String[] args){

 Scanner scan = new Scanner(System.in);

 String S = scan.next();
 String[] split = S.split("");     
  
   
    if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  }
 }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{

 public static void main(String[] args){

 Scanner scan = new Scanner(System.in);

 String S = scan.next();
 String[] split = S.split("");     
  
   
    if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  }
 }
} Main public static void main(String[] args){

 Scanner scan = new Scanner(System.in);

 String S = scan.next();
 String[] split = S.split("");     
  
   
    if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  }
 } main {

 Scanner scan = new Scanner(System.in);

 String S = scan.next();
 String[] split = S.split("");     
  
   
    if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  }
 } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan String[] split = S.split(""); split S.split("") S.split S "" if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  } split[2].equals(split[3]) split[2].equals split[2] split 2 split[3] split 3 {
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 } if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   } split[4].equals(split[5]) split[4].equals split[4] split 4 split[5] split 5 {
   System.out.println("Yes");
 } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
  System.out.println("No");
   } System.out.println("No") System.out.println System.out System System.out "No" { 
   System.out.println("No");
  } System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.Scanner; 
import java.util.Arrays;

class Main{

 public static void main(String[] args){

 Scanner scan = new Scanner(System.in);

 String S = scan.next();
 String[] split = S.split("");     
  
   
    if (split[2].equals(split[3])){
   if (split[4].equals(split[5])) {
   System.out.println("Yes");
 }
   else {
  System.out.println("No");
   }
 }
  else{ 
   System.out.println("No");
  }
 }
}