// Arup Guha
// 6/8/2023
// Alternate Solution to Kattis Problem: Statistics
// uses min_element, max_element functions.

using namespace std;
#include <bits/stdc++.h>

int main() {

    // Process cases.
    int n, tmp, cnt = 1;
    while (cin >> n) {

        // Read in values to a vector.
        vector<int> vals;
        for (int i=0; i<n; i++) {
            cin >> tmp;
            vals.push_back(tmp);
        }

        // Get min and max.
        int low = *min_element(vals.begin(), vals.end());
        int high = *max_element(vals.begin(), vals.end());

        // Output the results.
        cout <<"Case " << cnt << ": " << low << " " << high << " " << high-low << endl;
        cnt++;
    }
    return 0;
}
