P26380 [AtCoder] Code Senryu
普及
题目描述

Problem Description

In the Code Senryu corner, we are collecting senryu poems that capture the "everyday" of competitive programming, formatted in a 5-7-5 style.

Takahashi has created a senryu poem to submit to the Code Senryu corner.

Create a program to check if Takahashi's senryu poem is in the correct 5-7-5 format.

A senryu poem in the correct 5-7-5 format refers to a sequence of three strings: a 5-character string, a 7-character string, and another 5-character string, in that order.

Input Format

The input is given from the standard input in the following format:

$ S $ $ T $ $ U $

  • The first line contains three strings $S\ (1\ ≦\ |S|\ ≦\ 10),\ T\ (1\ ≦\ |T|\ ≦\ 10),\ U\ (1\ ≦\ |U|\ ≦\ 10)$ separated by spaces. This indicates that Takahashi's senryu poem is composed of $ S, T, U $ in this order. It is guaranteed that $ S, T, U $ are strings consisting only of lowercase alphabets.

Output Format

If Takahashi's senryu poem is in the correct 5-7-5 format, output valid; otherwise, output invalid. Ensure a newline at the end of the output.

Sample Input and Output

Sample Input #1

using namespace std

Sample Output #1

invalid

Sample Input #2

using namespa cestd

Sample Output #2

valid

Notes/Hints

Sample Explanation 1

Although it is a wonderful piece as a senryu poem, it does not meet the 5-7-5 format in the context of this problem.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
using namespace std
样例输出
invalid