Methods to store min and max values in prolog.