//g++  7.4.0

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    //A + k*B <= D*C*k
    //A/(D*C - B) <= k;
    
    ll A,B,C,D; cin>>A>>B>>C>>D;
    ll num = A;
    ll den = D*C - B;
    if(den <= 0)
        cout<<-1<<endl;
    else
        cout<<(num + den - 1)/den<<endl;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD (ll)1000000007
#define pi 3.14159265358979323846264338327
#define pii pair<int,int>
#define pll pair<ll,ll>
#define UNIQUE(v) sort(v.begin(),v.end());v.erase(unique(v.begin(),v.end()),v.end());
ll GCD(ll a,ll b){return b?GCD(b,a%b):a;}
ll power(ll a,ll b){ll ret=1;while(b){if(b%2)ret=ret*a%MOD;a=a*a%MOD;b/=2;}return ret;}
const int sz = 1<<17;

int a[20];
int num[30];

int f(int s,int n)
{
    int ret=0;
    for(int i=0;i<n;i++)
        if((1<<i)&s)ret|=a[i];
    return ret;
}

double dist(double x0,double y0, double x1, double y1)
{
    return (x0-x1)*(x0-x1)+(y0-y1)*(y0-y1);
}

int main()
{
    int n;scanf("%d",&n);
    double x0,y0,xh,yh;
    scanf("%lf %lf %lf %lf",&x0,&y0,&xh,&yh);
    double xm=(x0+xh)/2.0, ym=(y0+yh)/2.0;
    x0-=xm,y0-=ym;
    double degree=pi*2.0/(double)n;
    double nx=x0*cos(degree)-y0*sin(degree);
    double ny=x0*sin(degree)+y0*cos(degree);

    printf("%lf %lf",nx+xm,ny+ym);
    return 0;
}
