#include "testlib.h"
using namespace std;

int main(int argc, char* argv[])
{   registerValidation(argc, argv);
    int a;
    if ((validator.group() == "task1") || (validator.group() == "task2")) a = inf.readInt(1, 10000, "a"); 
        else a = inf.readInt(1, 1000000000, "a");
    
    inf.readEoln();
    int x = inf.readInt(0, a, "x");       inf.readSpace();
    int y = inf.readInt(0, a, "y");       inf.readSpace();
    int z = inf.readInt(0, a, "z");       inf.readEoln();
    if ((x != 0) && (y != 0) && (z != 0) && (x != a) && (y != a) && (z != a))
        quitf(_pe, "point (%d, %d, %d) is not on the surface", x, y, z);
       
    if (validator.group() == "task1") 
        if ((x != 0) && (y != 0) && (z != 0))
            quitf(_pe, "point (%d, %d, %d) is not included in the task1", x, y, z);
    if ((validator.group() == "task2") || (validator.group() == "task3"))
        if ((x == 0) || (y == 0) || (z == 0))
            quitf(_pe, "point (%d, %d, %d) is not included in the task2-3", x, y, z);

    inf.readEof();
    return 0;
}