#include <iostream>

using namespace std;

int main (){

    double a,b,c,i,j,k,l;

    cin >> a >> b >> c >> i >> j >> k;

    while ( a-i>0 && b-j>0 && c-k>0 ){
        a=a-i;
        b=b-j;
        c=c-k;
        }

    if ( b>a && c>a ){
        cout << 0 << ' ' << b-a*j/i << ' ' << c-a*k/i << endl;
        }
    else
    if ( a>b && c>b ){
        cout << a-b*i/j << ' ' << 0 << ' ' << c-b*k/j << endl;
        }
    else cout << a-c*i/k << ' ' << b-c*j/k << ' ' << 0 << endl;

    cout.precision(5);

    return 0;
    }
