#include <stdio.h>
int main() {
    int security;
    scanf("%d", &security);
    int ambulance = 0, police = 0, fire = 0, air = 0;
    if (severity >= 1 && severity <= 3) {
        ambulance = 1;
        police = 1;
    } else if (severity >= 4 && severity <= 6) {
        ambulance = 2;
        fire = 1;
    } else if (severity >= 7 && severity <= 9) {
        ambulance = 3;
        police = 2;
        fire = 1;
    } else if (security == 10) {
        ambulance = 5;
        police = 3;
        fire = 2;
        air = 1;
    }
    if (air)
        printf("%d %d %d %d\n", ambulance, police, fire, air);
    else
        printf("%d %d %d\n", ambulance, police, fire);
    return 0;
}