#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    std::vector<double> balls;

    double ball;
    char const* const prompt = "\nnumber?\n> "; 
    while (cout << prompt, cin >> ball)
    {
        balls.push_back(ball);
        sort(balls.begin(), balls.end());

        bool just_another_number = true;

        const std::size_t size = balls.size();
        if (ball == balls.front())
        {
            if (size == 1 || size > 1 && balls[1] != ball)
            {
                just_another_number = false;
                cout << ball << " is the smallest number yet!\n";
            }
        }

        if (ball == balls.back())
        {
            if (size == 1 || size > 1 && balls[balls.size() - 2] != ball)
            {
                just_another_number = false;
                cout << ball << " is the largest number yet!\n";
            }
        }

        if (just_another_number)
            cout << '\n' << ball << " is just another number.\n";
    }
}