public void read() throws IOException {
        System.out.print("Base = ");
        String _base = READER.readLine().trim();

        if (_base.matches("^.*[.,].*$")) {
            throw new RuntimeException("Base must be integer.");
        }

        if (new BigInteger(_base).compareTo(new BigInteger("" + (1 << 16))) > -1) {
            throw new RuntimeException("Mmm, " + _base + " is too large number to be a base and I cannot be sure that it's prime. Enter a prime number that is less than " + (1 << 16) + ".");
        }

        this.base = Integer.valueOf(_base);

        // let's check that _base is prime
        PAdic.checkForPrime(this.base);

        boolean readSuccessfully = false;
        while (!readSuccessfully) {
            System.out.print("A = ");
            try {
                a = readNext();
                readSuccessfully = true;
            } catch (RuntimeException e) {
                System.out.println(e.getMessage());
                readSuccessfully = false;
            }
        }

        System.out.println("Variable A interpreted as " + a);

        readSuccessfully = false;
        while (!readSuccessfully) {
            System.out.print("B = ");
            try {
                b = readNext();
                readSuccessfully = true;
            } catch (RuntimeException e) {
                System.out.println(e.getMessage());
                readSuccessfully = false;
            }
        }
        System.out.println("Variable B interpreted as " + b);
     }