#include <typeinfo>
#include <iostream>
using namespace std;


Stamps min_stamps(int n);


int main() {

    {   // vigilar el tipus Stamps

        struct Stamps_cntrl {
            int stamp7;
            int stamp4;
        };

        Stamps ru;
        Stamps_cntrl rc;

        // diagnòstics en temps de compilació  
        ru.stamp7 = rc.stamp7;  
        ru.stamp4 = rc.stamp4;  

        // diagnòstics en temps d'execució
        if (sizeof(ru)!=sizeof(rc))     throw string("'Stamps' is not well defined");
        if (typeid(ru.stamp7)!=typeid(rc.stamp7)) throw string("'Stamps' is not well defined");
        if (typeid(ru.stamp4)!=typeid(rc.stamp4)) throw string("'Stamps' is not well defined");
    }

    int n;
    while (cin >> n) {
        Stamps stamp = min_stamps(n);
        cout << stamp.stamp7 << " " << stamp.stamp4 << endl;
    }
}

    
