import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] split = in.nextLine().split("\\.");
        if (split.length != 4) {
            System.out.println("NO");
            return;
        }
        int flag = 1;
        for (int i = 0; i < 4; i++) {
            if (split[i].isEmpty()) {
                flag = 0;
                break;
            }
            if (!split[i].matches("[0-9]{1,3}")) flag = 0;
            if (Integer.parseInt(split[i]) > 255) flag = 0;
            if (split[i].charAt(0) == '0' && split[i].length() > 1) flag = 0;
        }
        if (flag == 1) System.out.println("YES");
        else System.out.println("NO");
        in.close();
    }
}

这就是个垃圾题,一点难度没有,故意不告诉你输入格式让你试,你怎么不在输入里加中文和emoji呢