<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>a-coffee</title>
    <script>
        function coffee(S){
            if((S.substr(2,1) == S.substr(3,1) && S.substr(2,1)!='') && (S.substr(4,1) == S.substr(5,1) && S.substr(4,1)!='')){
                console.log('Yes');
            }else{
                console.log('No');
            }
        }

        coffee('sippuu');  //Yes
        coffee('Yes'); //No
        coffee('iphone'); //No
        coffee('No'); //No 
        coffee('coffee'); //Yes
        coffee('Yes') //No
        
        
    </script>
</head>
<body>
    
</body>
</html>