#include <stdio.h>

int r() { int x; scanf("%d",&x); return x; }

int main()
{
    int y,z; long long u=r(),v=r(),w=r(),x=r(),t=r(),a=t-u,b=v-t,p=1,q=0,g=w+x,f=u*w+v*x-t*g;

    for(;w>=0;--w,--g,f+=a)
        for (;x>=0&&f>=0;--x,--g,f-=b)
            if (q*f<p*g)
                p=f,q=g,y=w,z=x;

    printf("%d %d",y,z);
}

#include<stdio.h>
#include<math.h>

#define eps 1e-12

int main() {
	int t1,t2,t0,x1,x2,i,a1,a2;
	long long j,t,ans;

	scanf("%d %d %d %d %d",&t1,&t2,&x1,&x2,&t0);
	if (t0==t2) {
		if (t0==t1) printf("%d %d\n",x1,x2);
		else printf("0 %d\n",x2);
		return 0;
	}
	ans=(long long)x2*t2,a1=0,a2=x2;
	for(i=1;i<=x1;i++) {
		j=((long long)(t0-t1)*i+(t2-t0-1))/(t2-t0);
		if (j>x2) continue;
		t=(long long)i*t1+j*t2;
		if (t*(a1+a2)<ans*(i+j) || t*(a1+a2)==ans*(i+j) && i+j>a1+a2)
			ans=t,a1=i,a2=j;
	}
	printf("%d %d\n",a1,a2);
	return 0;
}

#include <stdio.h>
int main()
{
    long long t1,t2,x1,x2,t0,x,y;
    double t,tt=0x3f3f3f3f;
    scanf("%lld %lld %lld %lld %lld",&t1,&t2,&x1,&x2,&t0);
    while(x1>=0&&x2>=0)
    {
        t=(t1*x1+t2*x2)*1.0/(x1+x2);
        if(t<t0)
        {
            x1--;
        }
        else
        {
            if(t<tt)
            {
                tt=t;
                x=x1;
                y=x2;
            }
            x2--;
        }
    }
    printf("%lld %lld\n",x,y);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
double comp(int y1,int y2)
{
    double left = t0;
    double right = (double)((double)t1*y1+(double)t2*y2)/(double)(y1+y2);
    return left-right;
}

int main(void)
{
    int x1,x2;
    double temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    double state;
    temp = 9999999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.0000001 && state > -0.0000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(state > 0.0000001)
        {
            i--;
        }
        else
        {

            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

typedef long long ll;

void solve(ll t1, ll t2, ll x1, ll x2, double t0)
{
    ll i, l, r, m, ans, y1, y2;
    double t, temp;
    if (t1 == t2)
    {
        printf("%I64d %I64d\n", x1, x2);
        return;
    }
    ans = x2;
    y1 = 0;
    y2 = x2;
    temp = t2;
    if (t1 == t0 && (t1 < temp || x1 > ans))
    {
        ans = x1;
        y1 = x1;
        y2 = 0;
        temp = t1;
    }
    for (i = 1; i <= x1; i ++)
    {
        l = 1;
        r = x2;
        while (l <= r)
        {
            m = (l + r) >> 1;
            t = (double)(t1 * i + t2 * m) / (i + m);
            if (t == t0)
            {
                if (t < temp || i + m > ans)
                {
                    temp = t;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                break;
            }
            else if (t > t0)
            {
                if (t < temp || (t == temp && i + m > ans))
                {
                    temp = t;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                r = m - 1;
            }
            else
            {
                l = m + 1;
            }
        }
    }
    printf("%I64d %I64d\n", y1, y2);
}

int main()
{
    int t1, t2, x1, x2, t0;
    while (scanf("%d%d%d%d%d", &t1, &t2, &x1, &x2, &t0) == 5)
    {
        solve(t1, t2, x1, x2, t0);
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

#define ll long long
int GCD(int a,int b){int r; while(a){r=b; b=a; a=r%a;} return b;}

int main(){
  int i,j,k,l,m,n;
  int t1,t2,x1,x2,t0;
  double opt, tmp;
  int r1, r2;
  ll y1, y2, yy1, yy2;

  while(scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0)==5){
    opt = 1e100;

    if(t1==t0 && t2==t0){
      printf("%d %d\n",x1,x2);
      continue;
    }
    if(t1==t0){
      printf("%d 0\n",x1);
      continue;
    }
    if(t2==t0){
      printf("0 %d\n",x2);
      continue;
    }

    y2 = 1;
    REP(y1,0,x1+1){
      while(t1*y1+t2*y2 < t0*(y1+y2)){
        y2++;
        if(y2 > x2) break;
      }
      if(y2 > x2) break;

      k = GCD(y1, y2);
      if(k>1) continue;

      tmp = (t1*y1+t2*y2) / (double)(y1+y2);
      if(opt > tmp){
        opt = tmp;

        k = 1000000000;
        if(y1 && k > x1 / y1) k = x1 / y1;
        if(y2 && k > x2 / y2) k = x2 / y2;

        r1 = y1 * k;
        r2 = y2 * k;
      }
    }

    printf("%d %d\n",r1,r2);
  }

  return 0;
}

#include <stdio.h>
#include <stdlib.h>
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define abs(a) ((a < 0) ? (-a) : (a))
#define double long double

long long t1, t2, t0, x1, x2, y1, y2, y1_ans, y2_ans;
double ans = 100000000000000.0;
double eps = 0.000000000000001;

int
eq(double a, double b)
{
    return (abs(a - b) < eps);
}

int
main(void)
{
    scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0);
    if(t2 == t0){
        y2_ans = y2 = x2;
        for(y1 = 0; y1 <= x1; ++y1){
            double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
            if(tmp < t0) continue;
            if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
                ans = tmp - (double)t0;
                y1_ans = y1;
            }
        }
        printf("%I64d %I64d", y1_ans, y2_ans);
        return 0;
    }
    for(y1 = 0; y1 <= x1; ++y1){
        y2 = ((y1 * (t0 - t1)) % (t2 - t0)) ? (y1 * (t0 - t1)) / (t2 - t0) + 1 : (y1 * (t0 - t1)) / (t2 - t0);
        if(y2 > x2) continue;
        if(y1 == 0 && y2 == 0) continue;
        double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
        if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
            ans = tmp - (double)t0;
            y1_ans = y1;
            y2_ans = y2;
        }
    }

    if(t1 == t0){
        y1_ans = y1 = x1;
        for(y2 = 0; y2 <= x2; ++y2){
            double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
            if(tmp < t0) continue;
            if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
                ans = tmp - (double)t0;
                y2_ans = y2;
            }
        }
        printf("%I64d %I64d", y1_ans, y2_ans);
        return 0;
    }

    for(y2 = 0; y2 <= x2; ++y2){
        y1 = (y2 * (t2 - t0)) / (t0 - t1);
        if(y1 > x1) continue;
        if(y1 == 0 && y2 == 0) continue;
        double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
        if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
            ans = tmp - (double)t0;
            y1_ans = y1;
            y2_ans = y2;
        }
    }
    printf("%I64d %I64d", y1_ans, y2_ans);
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>

#define MAX 100010
#define clr(ar) memset(ar, 0, sizeof(ar))
#define read() freopen("lol.txt", "r", stdin)

long long int t1, t2, x1, x2, t0, r1, r2;

double F(long long int y1, long long int y2){
    long long int x = (t1 * y1) + (t2 * y2);
    long long int y = (y1 + y2);
    double res = ((1.0 * x) / (1.0 * y));
    return res;
}

bool Check(long long int y1, long long int y2){
    return ((y1 + y2) >= (r1 + r2));
}

int main(){
    int i, j, k;
    long long int y1, y2;

    while (scanf("%I64d %I64d %I64d %I64d %I64d", &t1, &t2, &x1, &x2, &t0) != EOF){
        r1 = -1, r2 = -1;
        double dif = 1e18;

        for (y1 = 0; y1 <= x1; y1++){
            long long int low = 0, high = x2;
            if (y1 == 0) low++;

            while ((low + 1) < high){
                long long int mid = (low + high) >> 1LL;
                if (F(y1, mid) <= t0) low = mid;
                else high = mid;
            }

            low -= 10, high += 10;
            for (; ;low++){
                if (low > x2) break;
                double r = F(y1, low);
                if ((r >= t0) || (fabs(r - t0) <= 1e-8)){
                    double tmp = r - t0;
                    if ((tmp < dif) && (fabs(tmp - dif) > 1e-8)) dif = tmp, r1 = y1, r2 = low;
                    else if ((fabs(tmp - dif) <= 1e-8) && Check(y1, low)) dif = tmp, r1 = y1, r2 = low;
                }
                if (low == high) break;
            }
        }

        printf("%I64d %I64d\n", r1, r2);
    }
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
double comp(int y1,int y2)
{
    double left = t0;
    double right = (double)((double)t1*y1+(double)t2*y2)/(double)(y1+y2);
    return left-right;
}

int main(void)
{
    int x1,x2;
    double temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    double state;
    temp = 9999999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
float comp(int y1,int y2)
{
    float left = t0;
    float right = (float)(t1*y1+t2*y2)/(float)(y1+y2);
    printf("%f\n",left-right);
    return left-right;
}

int main(void)
{
    int x1,x2;
    float temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    float state;
    temp = 99999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(i+j==1)
            break;
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
float comp(int y1,int y2)
{
    float left = t0;
    float right = (float)(t1*y1+t2*y2)/(float)(y1+y2);
    return left-right;
}

int main(void)
{
    int x1,x2;
    float temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    float state;
    temp = 99999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(i+j==1)
            break;
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>
#define abs(a) (a)>0?(a):(-a)
int t0,t1,t2;
int comp(int y1,int y2)
{
    long long left = (y1+y2)*t0;
    long long right = t1*y1+t2*y2;
    return left-right;
}

int main(void)
{
    int x1,x2;
    int temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    int state;
    temp = x1;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state == 0)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(state > 0)
        {
            i--;
            if(abs(state)<temp)
            {
                cold = i;
                hot = j;
                temp = abs(state);
            }
        }
        else
        {
            j--;
            if(abs(state)<temp)
            {
                cold = i;
                hot = j;
                temp = abs(state);
            }
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
double comp(int y1,int y2)
{
    double left = t0;
    double right = (double)((double)t1*y1+(double)t2*y2)/(double)(y1+y2);
    return left-right;
}

int main(void)
{
    int x1,x2;
    double temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    double state;
    temp = 999999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(i+j==1)
            break;
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
float comp(int y1,int y2)
{
    float left = t0;
    float right = (float)(t1*y1+t2*y2)/(float)(y1+y2);
    printf("%f\n",left-right);
    return left-right;
}

int main(void)
{
    int x1,x2;
    float temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    float state;
    temp = 99999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        printf("state %f temp %f cold %d hot%d\n",state,temp,cold,hot);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(i+j==1)
            break;
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
double comp(int y1,int y2)
{
    double left = t0;
    double right = (double)((double)t1*y1+(double)t2*y2)/(double)(y1+y2);
    return left-right;
}

int main(void)
{
    int x1,x2;
    double temp;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    double state;
    temp = 999999.0000;
    int cold,hot;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state < 0.000001 && state > -0.000001)
        {
            cold = i;
            hot = j;
            break;
        }
        else if(state > 0.000001)
        {
            i--;
        }
        else
        {
            if(-state<temp)
            {
                cold = i;
                hot = j;
                temp = -state;
            }
            j--;
        }
    }
    printf("%d %d\n",cold,hot);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
int comp(int y1,int y2)
{
    long long left = (y1+y2)*t0;
    long long right = t1*y1+t2*y2;
    return left>right?1:(left==right?0:-1);
}

int main(void)
{
    int x1,x2;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    int state;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state == 0)
            break;
        else if(state == 1)
            i--;
        else
            j--;
    }
    printf("%d %d\n",i,j);
    return 0;
}

#include <stdio.h>

int t0,t1,t2;
int comp(int y1,int y2)
{
    long long left = t0;
    long long right = (t1*y1+t2*y2)/(y1+y2);
    return left>right?1:(left==right?0:-1);
}

int main(void)
{
    int x1,x2;
    scanf("%d%d%d%d%d",&t1,&t2,&x1,&x2,&t0);
    int i,j;
    int state;
    for(i=x1,j=x2; i>=0,j>=0;)
    {
        state = comp(i,j);
        if(state == 0)
            break;
        else if(state == 1)
            i--;
        else
            j--;
    }
    printf("%d %d\n",i,j);
    return 0;
}

#include <stdio.h>

#define INF (1LL << 50)

typedef long long ll;

void solve(ll t1, ll t2, ll x1, ll x2, double t0)
{
    ll i, l, r, m, ans, y1, y2;
    double t, temp;
    if (t1 == t2)
    {
        printf("%I64d %I64d\n", x1, x2);
        return;
    }
    temp = INF;
    y1 = y2 = ans = -1;
    for (i = 0; i <= x1; i ++)
    {
        l = 0;
        r = x2;
        while (l <= r)
        {
            m = (l + r) >> 1;
            if (i == 0 && m == 0)
            {
                l = m + 1;
                continue;
            }
            t = (double)(t1 * i + t2 * m) / (i + m);
            if (t == t0)
            {
                if (t < temp || i + m > ans)
                {
                    temp = t;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                break;
            }
            else if (t > t0)
            {
                if (t < temp || (t == temp && i + m > ans))
                {
                    temp = t;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                r = m - 1;
            }
            else
            {
                l = m + 1;
            }
        }
    }
    printf("%I64d %I64d\n", y1, y2);
}

int main()
{
    int t1, t2, x1, x2, t0;
    while (scanf("%d%d%d%d%d", &t1, &t2, &x1, &x2, &t0) == 5)
    {
        solve(t1, t2, x1, x2, t0);
    }
    return 0;
}

#include <stdio.h>

#define INF (1LL << 60)

typedef long long ll;

void solve(ll t1, ll t2, ll x1, ll x2, double t0)
{
    ll i, l, r, m, ans, y1, y2;
    double t, temp;
    if (t1 == t2)
    {
        printf("%I64d %I64d\n", x1, x2);
        return;
    }
    temp = INF;
    y1 = y2 = ans = -1;
    for (i = 0; i <= x1; i ++)
    {
        l = 0;
        r = x2;
        while (l <= r)
        {
            m = (l + r) >> 1;
            t = (double)(t1 * i + t2 * m) / (i + m);
            if (t == t0)
            {
                if (t0 < temp || i + m > ans)
                {
                    temp = t0;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                break;
            }
            else if (t > t0)
            {
                if (t < temp || (t == temp && i + m > ans))
                {
                    temp = t;
                    y1 = i;
                    y2 = m;
                    ans = i + m;
                }
                r = m - 1;
            }
            else
            {
                l = m + 1;
            }
        }
    }
    printf("%I64d %I64d\n", y1, y2);
}

int main()
{
    int t1, t2, x1, x2, t0;
    while (scanf("%d%d%d%d%d", &t1, &t2, &x1, &x2, &t0) == 5)
    {
        solve(t1, t2, x1, x2, t0);
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define abs(a) ((a < 0) ? (-a) : (a))
#define double long double

long long t1, t2, t0, x1, x2, y1, y2, y1_ans, y2_ans;
double ans = 100000000000000.0;
double eps = 0.000000000000001;

int
eq(double a, double b)
{
    return (abs(a - b) < eps);
}

int
main(void)
{
    scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0);
    if(t2 == t0){
        if(t1 == t0){
            printf("%I64d %I64d", x1, x2);
        } else {
            printf("0 %I64d", x2);
        }
        return 0;
    }
    for(y1 = 0; y1 <= x1; ++y1){
        y2 = ((y1 * (t0 - t1)) % (t2 - t0)) ? (y1 * (t0 - t1)) / (t2 - t0) + 1 : (y1 * (t0 - t1)) / (t2 - t0);
        if(y2 > x2) continue;
        double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
        if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
            ans = tmp - (double)t0;
            y1_ans = y1;
            y2_ans = y2;
        }
    }
    printf("%I64d %I64d", y1_ans, y2_ans);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define abs(a) ((a < 0) ? (-a) : (a))
#define double long double

long long t1, t2, t0, x1, x2, y1, y2, y1_ans, y2_ans;
double ans = 100000000000000.0;
double eps = 0.000000000000001;

int
eq(double a, double b)
{
    return (abs(a - b) < eps);
}

int
main(void)
{
    scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0);
    if(t2 == t0){
        y2_ans = x2;
        y2 = x2;
        for(y1 = 0; y1 <= x1; ++y1){
            double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
            if(tmp < t0) continue;
            if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
                ans = tmp - (double)t0;
                y1_ans = y1;
            }
        }
        printf("%I64d %I64d", y1_ans, y2_ans);
        return 0;
    }
    for(y1 = 0; y1 <= x1; ++y1){
        y2 = ((y1 * (t0 - t1)) % (t2 - t0)) ? (y1 * (t0 - t1)) / (t2 - t0) + 1 : (y1 * (t0 - t1)) / (t2 - t0);
        if(y2 > x2) continue;
        if(y1 == 0 && y2 == 0) continue;
        double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
        if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
            ans = tmp - (double)t0;
            y1_ans = y1;
            y2_ans = y2;
        }
    }
    printf("%I64d %I64d", y1_ans, y2_ans);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define abs(a) ((a < 0) ? (-a) : (a))

long long t1, t2, t0, x1, x2, y1, y2, y1_ans, y2_ans;
double ans = 100000000000000.0;
double eps = 0.000000000001;

int
eq(double a, double b)
{
    return (abs(a - b) < eps);
}

int
main(void)
{
    scanf("%I64d%I64d%I64d%I64d%I64d", &t1, &t2, &x1, &x2, &t0);
    if(t2 == t0){
        if(t1 == t0){
            printf("%I64d %I64d", x1, x2);
        } else {
            printf("0 %I64d", x2);
        }
        return 0;
    }
    long long i;
    for(i = 0; i <= x1; ++i){
        y1 = i;
        y2 = ((y1 * (t0 - t1)) % (t2 - t0)) ? (y1 * (t0 - t1)) / (t2 - t0) + 1 : (y1 * (t0 - t1)) / (t2 - t0);
        if(y2 > x2) continue;
        if(y1 == 0 && y2 == 0) continue;
        double tmp = (double)(t1 * y1 + t2 * y2) / (double)(y1 + y2);
        if(tmp - (double)t0 < ans || (eq(tmp - (double)t0, ans) && y1 + y2 > y1_ans + y2_ans)){
            ans = tmp - (double)t0;
            y1_ans = i;
            y2_ans = y2;
        }
    }
    printf("%I64d %I64d", y1_ans, y2_ans);
    return 0;
}

#include<stdio.h>
#include<math.h>

#define eps 1e-12

int main() {
	int t1,t2,t0,x1,x2,i,j,a1,a2,tt;
	double t,tx,ans,dt,y;

	scanf("%d %d %d %d %d",&t1,&t2,&x1,&x2,&t0);
	if (t0==t2) {
		if (t0==t1) printf("%d %d\n",x1,x2);
		else printf("0 %d\n",x2);
		return 0;
	}
	ans=1e20;
	for(i=0;i<=x1;i++) {
		y=(t1-t0)/(double)(t0-t2)*i;
		if (y>x2+1.1) continue;
		tt=(int)floor(y+eps);
		j=tt;
		t=((double)i*t1+(double)j*t2)/(i+j);
		if (i+j>0 && t+eps>t0 && j<=x2) {
			dt=t-t0;
			if (dt+eps<ans) {
				ans=dt;
				a1=i,a2=j;
			} else if (dt<ans+eps) {
				if (a1+a2<i+j) a1=i,a2=j;
			}
		}
		j=tt+1;
		t=((double)i*t1+(double)j*t2)/(i+j);
		if (i+j>0 && t+eps>t0 && j<=x2) {
			dt=t-t0;
			if (dt+eps<ans) {
				ans=dt;
				a1=i,a2=j;
			} else if (dt<ans+eps) {
				if (a1+a2<i+j) a1=i,a2=j;
			}
		}
	}
	printf("%d %d\n",a1,a2);
	return 0;
}

#include<stdio.h>
#include<math.h>

#define eps 1e-12

int main() {
	int t1,t2,t0,x1,x2,i,j,a1,a2,tt;
	double t,tx,ans,dt,y;

	scanf("%d %d %d %d %d",&t1,&t2,&x1,&x2,&t0);
	if (t0==t2) {
		if (t0==t1) printf("%d %d\n",x1,x2);
		else printf("0 %d\n",x2);
		return 0;
	}
	ans=1e20;
	for(i=0;i<=x1;i++) {
		y=(t1-t0)/(double)(t0-t2)*i;
		if (y>x2+1.0) continue;
		tt=(int)floor(y+eps);
		j=tt;
		t=((double)i*t1+(double)j*t2)/(i+j);
		if (t+eps>t0 && j<=x2) {
			dt=t-t0;
			if (dt+eps<ans) {
				ans=dt;
				a1=i,a2=j;
			} else if (dt<ans+eps) {
				if (a1+a2<i+j) a1=i,a2=j;
			}
		}
		j=tt+1;
		t=((double)i*t1+(double)j*t2)/(i+j);
		if (t+eps>t0 && j<=x2) {
			dt=t-t0;
			if (dt+eps<ans) {
				ans=dt;
				a1=i,a2=j;
			} else if (dt<ans+eps) {
				if (a1+a2<i+j) a1=i,a2=j;
			}
		}
	}
	printf("%d %d\n",a1,a2);
	return 0;
}


#include<stdio.h>

int main()
{
    char s[99999];
    scanf("%s",s);
    printf("No");
    return 0;
}

#include<stdio.h>
int main()
{
  printf("No");
}

#include<stdio.h>
int main()
{
    printf("No\n");
    return 0;

}

#include<stdio.h>
int main()
{
    printf("No");
}

#include<stdio.h>
int main()
{
    printf("No\n");
}

#include<stdio.h>
int main(){
    printf("NO\n");
}

#include<stdio.h>
int main()
{
printf("no");
return 0;
}

#include <stdio.h>

int main()
{
    printf("no");

    return 0;
}

#include<stdio.h>
int main()
{

    printf("NO");

    return(0);
}

#include <stdio.h>

int main()
{
    printf("NO");

    return 0;
}

#include<stdio.h>
//#include<bits/stdc++.h>
//using namespace std;
int main()
{
    printf("NO\n");
    return 0;
}

#include <stdio.h>

int main(){
    int t;
    scanf("%d", &t);
    while(t--){
        int n;
        scanf("%d", &n);

        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>

int main()
{
    printf("No");

    return 0;
}

#include<stdio.h>

int main()
{
    printf("NO");

    return 0;
}

#include<stdio.h>
int main(){
    printf("NO\n");
    return 0;
}

    #include <stdio.h> /*this code was written by 190042146*/
    int main()
{

    printf("NO");

    return 0;

}

#include<stdio.h>
int main ()
{

    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("No\n");
    return 0 ;
}

#include<stdio.h>

int main()
{

    printf("No\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO");
}

#include<stdio.h>

int main()
{

    printf("no");

    return 0;
}

#include<stdio.h>
int main(){

    char st[12];
    gets(st);
            printf("no");

}

#include<stdio.h>
int main()
{
    printf("no\n");
}

#include <stdio.h>
int main(){
    printf("NO");
    return 0;
}

#include<stdio.h>
int main ()
{
    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO\n");
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main()
{
    printf("NO");
	return 0;
}

#include <stdio.h>
int main()
{
    printf("No");
    return 0;
}

#include <stdio.h>

int main(int argc, char *argv[])
{
    puts("no");

    return 0;
}

#include <stdio.h>
int main () {
    printf("NO");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("No\n");

}

#include<stdio.h>
int main()
{
    printf("no\n");
    return 0;
}

#include<stdio.h>
int main(){
    printf("No");
}

#include <stdio.h>
int main(){
    printf("NO");
    return 0-0-0;
}

#include<stdio.h>

int main()
{
    printf("NO\n");

    return 0;
}

#include <stdio.h>
int main( ) {

   printf( "no");

   return 0;
}

#include<stdio.h>
int main(){
	printf("NO");
	return 0;
}

#include<stdio.h>
int main()
{
	printf("NO");
}

#include<stdio.h>
main()
{

    printf("No");
}

#include<stdio.h>
int main()
{

    printf("NO\n");

    return 0;
}

#include <stdio.h>

int main()
{
    printf("NO\n");
    return 0;
}

#include <stdio.h>

int main()
{
    printf("no");
    return 0;
}

#include<stdio.h>

int main(void){

    printf("NO");}

#include<stdio.h>
int main()
{
   printf("NO\n");
}

#include<stdio.h>
#include<conio.h>
int main()
{
    printf("no");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO\n");
}

#include<stdio.h>
int main()
{
    printf("NO\n");
    return 0;
}

//its only accepted when we print no..otherwise not..
#include<stdio.h>
int main()
{
    printf("nO\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n;
    printf("No\n",n);
    return 0;
}

#include<stdio.h>
int main()
{

        printf("NO\n");
   return 0;

}

#include<stdio.h>
int main(){
    printf("NO");
    return(0);
}

#include<stdio.h>

int main ()
{
    printf("no");
}

#include<stdio.h>
int main()
{
   printf("NO\n");
   return 0;
}

#include <stdio.h>
int main()
{
    printf("NO\n");
}

#include<stdio.h>
int main()
{
    int i;
    scanf("%d",&i);
    printf("NO");
    return 0;
}

#include<stdio.h>
int main (){
printf("NO");
}

#include<stdio.h>
int main()
{
    printf("no");
    return 0;
}

#include<stdio.h>
int main(){
    printf("NO");
    return 0;
}

#include<stdio.h>
int main(){
    printf("No");
    return 0;
}

#include <stdio.h>

int main ()
{
    printf("NO");
    return 0;
}

#include<stdio.h>

int main()
{
    printf("no");
}

#include<stdio.h>
int main()
{
    printf("NO\n");

    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char a[100];
    gets(a);
    printf("NO");
}

#include<stdio.h>
int main()
{
    printf("No\n");
    return 0;
}

#include <stdio.h>

int main()
{
    printf("NO\n");
}

#include<stdio.h> //Hahaha
int main()
{
    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main ()
{
	printf("NO");
}

#include<stdio.h>

int main()
{
    printf("no\n");
    return 0;
}

#include<stdio.h>
int main()

{
    char a[100];
    gets(a);
    printf("No\n");
}

#include<stdio.h>
int main()
{

    printf("NO");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO");
}

#include<stdio.h>

int main()
{
    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main(){
    printf("no");
}

#include<stdio.h>
int main(){

	printf("No\n");

	return 0;
}

#include<stdio.h>
int main()
{
	printf("NO");
	return 0;
}

#include<stdio.h>
int main(){
          printf("No");
          return 0;
}

#include<stdio.h>
int main ()
{
    printf("NO\n");
    return 0;
}

#include <stdio.h>
int main()
{
    printf("NO");
}

#include<stdio.h>
int main()
{
    printf("NO\n");
    return 0;
}

#include<stdio.h>
int main()
{

    printf("No\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("NO");
    return 0;
}

#include <stdio.h>

int main()

{

 printf("No");
 return 0;
}

#include<stdio.h>
int main()
{
	printf("no");
}

#include<stdio.h>
int main(){
	int t;
	scanf("%d",&t);
	int z=t;
	while(t-->0){
		int a,b,c,d;
		scanf("%d %d %d %d",&a,&b,&c,&d);
		if((a+b)<=2*(c+d))
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}

#include<stdio.h>
int main()
{
printf("NO\n");
return 0;
}

#include<stdio.h>
int main()
{
    printf("no");
    return 0;
}

#include<stdio.h>
int main()
{

 	printf("NO");

	return 0;
}

#include<stdio.h>
int main(){
    printf("No");
}

#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(){
    printf("No");
    return 0;
}

#include<stdio.h>
int main()
{
    printf(" No");
    return 0;
}

#include<stdio.h>
int main(){
	printf("NO\n");
	return 0;
}

#include<stdio.h>

int main() {
	printf("No\n");
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
int main ()
{

printf("NO");

 return 0;
}

#include<stdio.h>
int main()
{
    printf("No");
    return 0;
}

#include<stdio.h>
main()
{
    printf("NO");
}

#include<stdio.h>
#include<math.h>
int main()
{

    return 0;
}

#include<stdio.h>
int main(){
	printf("Yes\n");
	return 0;
}

#include<stdio.h>
int main()
{
    int a;
    char b;
    scanf("%c%d",&b,&a);
    if(a%2==0)
    printf("0");
    else
    printf("1");

}

#include<stdio.h>
int main()
{
    printf("Yes\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int a;
    scanf("%d", &a);
    if(a==1)
    {
        printf("It is rated.\n");
    }
    else if(a==0)
    {
        printf("It's not rated.\n");
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int A,B,X;
    scanf("%d %d",&A,&B);
    X=A+B;
    printf("%d\n",X);
    return 0;

}

#include<stdio.h>

int main()
{
    int n;
    scanf("%d",&n);
    printf("%d",n);
    return 0;
}

#include<stdio.h>
int main()
{
    printf("Is it rated?");

}

#include<stdio.h>
int main()
{
    printf("  ");
    return 0;
}

#include<stdio.h>
int main(){

        int a,b,c,d,e,s;
        scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
        s=a+b+c+d+e;
        if(s%5==0&&s>4){
            printf("%d",s/5);
        }
        else{
            printf("-1");
        }

}

#include<stdio.h>
int main()
{
    printf("Isn't it?");
    return 0;
}

#include<stdio.h>
int main(){
    printf("YES\n");
    return 0;
}

#include<stdio.h>
int main ()
{
    int i = 9 ;
    printf("") ;
    return 0 ;
}

#include<stdio.h>

int main() {
	printf("N0\n");
	return 0;
}

#include<stdio.h>
int main()
{
    char s[10];
    scanf("%s",s);
    if(s[6]%2==0)

  printf("0\n");
  else
    printf("1\n");

}

#include<stdio.h>
int main()
{

    return 0;
}

#include<stdio.h>
int main()
{
    printf("");
    return 0;
}

#include<stdio.h>
int main()
{
    char s[50];
    scanf("%s",&s);
    printf("standard output\n");
 return 0;
}

#include<stdio.h>
main()
{

    printf("Yes");
}

#include<stdio.h>
int main()
{
	long long int i,n,k,t,a;
		scanf("%lld",&i);
	k=i%1000;
	n=(i-k)/1000;

		t=1;
	while(n>0)
	{
		if(n!=0)
{		t=t*n;
}		n=n-2;
	}

	a=t%k;

	printf("%lld\n",a);
}

#include <stdio.h>

int main() {
    int n;
    scanf("%d",&n);
    printf("%d",n);
	return 0;
}

#include<stdio.h>
#include<conio.h>
int main()
{
    printf("unrated");
    return 0;
}

#include<stdio.h>
int main(){
	printf("it is");
	return 0;
}

#include<stdio.h>
int main()
{
  printf("\n");

}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[16];
    scanf("%s",s);
    int x;
    x=strcmp(s,"standard input");
    if(x==-1)
        printf("standard output\n");
 return 0;
}

#include<stdio.h>
int main(){
    return 0;
}

#include <stdio.h>
int main()

{

 printf(" ");

 return 0;
}

#include<stdio.h>
int main()
{
    printf("Is it rated?\n");
}

#include<stdio.h>
int main()
{
    printf("");
}

#include<stdio.h>
int main()
{
    int c;
    scanf("%d",&c);
    printf("1\n");
 return 0;
}

#include<stdio.h>
int main()
{
    printf("yes\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("yes");
}

#include<stdio.h>

int main()
{
    int a,b;
    scanf("%d %d",&a,&b);

    if (a==0)
        printf("OUT\n");
    else if (a%27==0)
        printf("IN\n");
    else
        printf("OUT\n");

    return 0;
}

#include<stdio.h>
int main()
{

    printf("standard output\n");

    return 0;
}

#include<stdio.h>
int main()
{
    printf("Is it rated?");
    return 0;
}

#include<stdio.h>
int main()
{
    printf(" ");
    return 0;
}

#include<stdio.h>
int main()
{
    char ch[50];
    scanf("%s",ch);
    printf("standard output\n");
}

#include<stdio.h>
int main(){
    printf("YES\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int a;
    char b;
    char s[1000];

    scanf("%d",&a);
    scanf("%c",&b);
    gets(s);
    printf("%d\n",a);
    printf("%c\n",b);
    printf("%s\n",s);

    return 0;
}

#include <stdio.h>
int main () {
    printf("YES");return 0;
}

#include<stdio.h>
int main()
{
    printf("Yes\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("\n");
}

#include <stdio.h>
int main(){
    char s[100];
    scanf("%s",s);
    if(s=="Is it rated?")
    printf("YES");
}

#include<stdio.h>
int main(){

    return 0;
}

#include<stdio.h>
int main()
{
    char stdi;
    printf("input: ");
    scanf("%c",&stdi);
    printf("output: standard output\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n,i,j,temp,camp,sum=0,count=0;
    scanf("%d",&n);
    int a[n][2];

    for(i=0;i<n;i++)
    {
        for(j=0;j<2;j++)
            scanf("%d",&a[i][j]);
        if(a[i][0]!=a[i][1])
            count++;
    }
    if(count!=0)
    {
        printf("rated\n");
        return 0;
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<i;j++)
        {
            if(a[i][0]>a[j][0])
            {
                printf("unrated\n");
                return 0;
            }
        }
    }
    printf("maybe\n");
}

#include<stdio.h>
main()
{
    printf("YES");
}

#include<stdio.h>
int main()
{
    printf("");
}

    #include <stdio.h> /*this code was written by 190042146*/
    int main()
{

    return 0;

}

#include <stdio.h>
#include <conio.h>
int main(){

    return 0;
}

#include <stdio.h>
int main( ) {

   printf( "");

   return 0;
}

#include <stdio.h>

int main()
{
    printf("YES");

    return 0;
}

#include<stdio.h>
int main()
{
    return 0;
}

#include<stdio.h>
int main(){
          printf("YES");

          return 0;
}

#include<stdio.h>

int main()
{
    printf("Yes");

    return 0;
}

#include<stdio.h>

int n,a,b,l,t;

int main()
{
	scanf("%d",&n);
	l=5000;t=0;
	while(n--)
	{
		scanf("%d%d",&a,&b);
		if(a!=b)t=1;
		if(t==0&&a>l)t=-1;
		if(t==0)l=a;
	}
	if(t==-1)printf("unrated\n");
	if(t==0)printf("maybe\n");
	if(t==1)printf("rated\n");
	return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
	char variable[7];
	fgets(&variable,8,stdin);
	int numero = variable[6] - '0';
	printf("%d", numero%2 );
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
int main ()
{
    setlocale(LC_ALL, "Rus");
    char S[100];
    int a, b;
scanf("%s", &S);
if(a == 27){printf("IN"); return 0;}
printf("����������� �����");

 return 0;
}

#include<stdio.h>

int main()
{
printf("Yes");
return 0;
}

#include<stdio.h>
int main(){
    int a;
     scanf("%d",&a);
     printf("%d",a);

}

#include<stdio.h>
int main()
{
   return 0;

}

#include<stdio.h>
int main()

{
    char a[100];
    scanf("%s",a);
    printf("%s\n",a);
}

#include<stdio.h>
int main(){
	return 0;
}

#include<stdio.h>

int main()
{

    return 0;
}

#include<stdio.h>
#include<math.h>
main()
{

}

#include<stdio.h>
int main()
{
    printf("YES");
}

#include<stdio.h>
main()
{
    char x[100];
    scanf("",x);
    printf("%s\n",x);
}

#include<stdio.h>
int main()
{

   printf("APRIL FOOL\n");

    return 0;
}

#include <stdio.h>
int main( ) {

   printf( "");

   return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main() {
	return 0;
}

#include<stdio.h>

int main()
{
    char s[99999];
    scanf("%s",s);
    int n=strlen(s);
    for (int i=0;i<n;i++)
    {
        printf("%c",s[i]);
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        printf("\n");
    }
    // char x[100];
    // gets(x);
    // if(x!='\0')
    //     puts(x);
    // else
    //     printf("");
}

#include<stdio.h>
int main(){
    return 0;
}

#include<stdio.h>
int main()
{
    char stdi;
    scanf("%c",&stdi);
    printf("standard output\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("YES\n");
}

#include<stdio.h>
int main()
{
    printf("Is it rated?\n");
    return 0;
}

#include<stdio.h>
int main()
{
    printf("Yes\n");

}

#include<stdio.h>
int main()
{
    int d;
    scanf("%d",&d);

    printf("%d",d);

    return(0);
}

#include<stdio.h>
int main ()
{
    int i  ;
    scanf("%d",&i) ;
    printf("%d\n",i) ;
    return 0 ;
}

#include <stdio.h>
#include <stdlib.h>
int recf(int n){
if (n == 0)return 1;
int a=n;
printf("%d ",a);
return n*recf(n-1);      }

int main ()
{
    int n;
    scanf("%d", &n);
    printf("%d \n", n);
recf(n);

printf("%d",recf(n));
return 0;
}

#include<stdio.h>
int main()
{

    return 0;
}

#include<stdio.h>

int main()
{
    printf("YES");

    return 0;
}

#include <stdio.h>
int main( ) {

   int c;

   printf( "Enter a value :");
   c = getchar( );

   printf( "\nYou entered: ");
   putchar( c );

   return 0;
}