#include <algorithm> // For the max and min algorithms
#include <iostream> // For input and output streams
int main() {
 // Initialize the max and min values
 int max = std::numeric_limits<int>::min();
 int min = std::numeric_limits<int>::max();
 // Keep asking the user for numbers until they enter -1
 int input = 0;
 while (input != -1) {
 std::cout << "Enter a number (-1 to stop): ";
 std::cin >> input;
 // Update the max and min values using the max and min algorithms
 max = std::max(max, input);
 min = std::min(min, input);
 }
 // Print the final max and min values
 std::cout << "Max: " << max << std::endl;
 std::cout << "Min: " << min << std::endl;
 return 0;
}