#include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
typedef long long ll;
typedef long double ld;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define repr(i,n) for(ll i=(n-1);i>=0;i--)
#define all(x) x.begin(),x.end()
#define br cout << "\n";
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9+7;
using Graph = vector<vector<ll>>;
template<class T> inline bool chmin(T &a, T b) { if(a > b){ a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b) { if(a < b){ a = b; return true;} return false;}
ll ceilll(ll a, ll b) {return (a + b-1) / b;} // if(a%b != 0) (a/b) + 1
ll get_digit(ll a) {ll digit = 0; while(a != 0){a /= 10; digit++;} return digit;} // a != 0
template<typename T> void vecdbg(vector<T>& v){ rep(i, v.size()){cout << v[i] << " ";} br;}
template<typename T> void vecvecdbg(vector<vector<T>>& v){ rep(i, v.size()){rep(j, v[i].size()){cout << v[i][j] << " ";} br;}}
ll POW(ll a, ll n){ ll res = 1; while(n > 0){ if(n & 1){ res = res * a; } a *= a; n >>= 1; } return res; }
using P = pair<ll, ll>;

// 0 false, 1 true 
// string number to int : -48 or - '0'
// a to A : -32
// ceil(a)  1.2->2.0
// c++17	g++ -std=c++17 a.cpp
// global vector -> 0 initialization
// DONT FORGET TO INTIALIZE
// The type of GRID is CHAR. DONT USE STRING
// If the result in local and judge is different, USE CODETEST!!
// (a * b)over flow?   if(a > INF / b){ /* overflow */}

const long double PI = (acos(-1));

int main() {
    std::cout << std::fixed << std::setprecision(15);
    ld n; cin >> n;
    ld x, y; cin >> x >> y;
    ld x2, y2; cin >> x2 >> y2;

    //中心
    ld xm = (x + x2) / 2;
    ld ym = (y + y2) / 2;

    //cout << xm << " " << ym << endl;

    ld tmp_x = x - xm, tmp_y = y - ym;

    ld rotate = 180 - (180 * (n-2) / n);
    //cout << rotate << endl;

    ld rad = (rotate / 180) * PI;

    ld new_x = tmp_x * cos(rad) - tmp_y * sin(rad);
    ld new_y = tmp_x * sin(rad) + tmp_y * cos(rad);

    cout << new_x + xm << " " << new_y + ym << endl;



}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll x,y,a,b;
    cin>>x>>y;
    cin>>a>>b;
    ll ans=0;
    while(x<b)
    {
        x=x*a;
        if(x>=y)
            break;
        ans++;
    }
    if(x>=y)
    {
        cout<<ans;
        return 0;
    }
    ans=ans+(y-x+b-1)/b;
    cout<<ans-1;
}

