#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
using namespace std;

#define ff   first
//#define ss   second
#define ll  long long int
#define PB   push_back
#define MP  make_pair
#define mii  map<int,int>
#define pqb  priority_queue<int>
#define pqs  priority_queue<int,vi,greater<int> >
#define mod  1000000007
#define sp(x,y)  fixed<<setprecision(y)<<x
#define rz resize
#define FOR(a, b) for (auto (a) : (b))
#define t(x)  int x; cin>>x; while(x--)
mt19937     rng(chrono::steady_clock::now().time_since_epoch().count());
#define setbits(x)  __builtin_popcountll(x)
#define zerobits(x)  __builtin_ctzll(x)
#define fo(i,a,n) for(ll i=a;i<n;i++)
#define ALL(v) v.begin(), v.end()
#define ALLA(arr, sz) arr, arr + sz
#define SIZE(v) (int)v.size()
#define SORT(v) sort(ALL(v))
#define REP(i, a, b) for (ll i=a; i<=b; i++)
#define PI 3.1415926535897932384626
#define RALL(x) rbegin(x),rend(x)
#define endl "\n"
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;

//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

ll mpow(ll base, ll exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

ll D, X, Y;
void extendedEuclid(ll A, ll B) {
    if(B == 0) {
        D = A;
        X = 1;
        Y = 0;
    }
    else {
        extendedEuclid(B, A%B);
        int temp = X;
        X = Y;
        Y = temp - (A/B)*Y;
    }
}

ll modInverse(ll A, ll M)
{
    extendedEuclid(A,M);
    return (X%M+M)%M;    //x may be negative
}

void SOE(int n)
{   bool pr[n+1];
     memset(pr, true, sizeof(pr));

    for (int p=2; p*p<=n; p++)
    {
        if (pr[p] == true)
        {
            for (int i=p*2; i<=n; i += p)
                pr[i] = false;
        }
    }
    int i=0;
     for (int p=2; p<=n; p++)
       if (pr[p]){
        cout<<p<<" ";
       }

}
bool isP(int n)
{  bool flag=1;
    for (int i = 2; i <= sqrt(n); i++) {
        if (n % i == 0) {
            flag = 0;
            break;
        }
    }
    if(n<=1)
    flag=0;
    else if(n==2)
    flag=1;
    return flag;
}

ll modularExponentiation(ll x,ll n,ll M)
{
    int result=1;
    while(n>0)
    {
        if(n % 2 ==1)
            result=(result * x)%M;
        x=(x*x)%M;
        n=n/2;
    }
    return result;
}

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}

ll modBigNumber(string num, ll m)
{
    // Store the modulus of big number
    vector<int> vec;
    ll mod1 = 0;
    string s=to_string(m);
    // Do step by step division
    for (int i = 0; i < num.size(); i++) {

        int digit = num[i] - '0';

        // Update modulo by concatenating
        // current digit.
        mod1 = mod1 * 10 + digit;

        // Update quotient
        int quo = mod1 / m;
        vec.push_back(quo);

        // Update mod for next iteration.
        mod1 = mod1 % m;
    }
  //  cout << "\nRemainder : " << mod << "\n";

    return mod1 ;
}

void aks()
{
  ll a,b,c,d;
  cin>>a>>b>>c>>d;
  if(d*c-b==0)
  {
      cout<<-1;
      return ;
  }
  double ans=(double)a/(double)(d*c-b);
  if(ans>=0)
    {
        if(a%(d*c-b)!=0)
        {
            ll x=(ll)ans+1;
            cout<<x;
        }
        else
        {
            cout<<(ll)ans;
        }
    }
  else
    cout<<-1;

}


int main(){
     ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
    // code here
   // solve();
       //t(x)
       {
           aks();
       }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int x0, y0, xhalf, yhalf;
  cin >> n >> x0 >> y0 >> xhalf >> yhalf;
  double cx = (xhalf + x0) / 2.0, cy = (yhalf + y0) / 2.0;
  double rad = 2 * M_PI / (double)n;
  double ansx = cos(rad) * x0 - sin(rad) * y0 + cx - cx * cos(rad) + cy * sin(rad);
  double ansy = sin(rad) * x0 + cos(rad) * y0 + cy - cx * sin(rad) - cy * cos(rad);
  cout << setprecision(10) << ansx << " " << ansy << endl;
}