Problem: Find common tangent lines of two circles $c1$ and $c2$.

Constraints

* $-1,000 \leq c1x, c1y, c2x, c2y \leq 1,000$
* $1 \leq c1r, c2r \leq 1,000$
* $c1$ and $c2$ are different

Input

Center coordinates ($cix$, $ciy$) and radii $cir$ of two circles $c1$ are $c2$ are given in the following format.

$c1x \; c1y \; c1r$
$c2x \; c2y \; c2r$

All input values are given in integers.

Output

Print coordinates of the tangent points on circle $c1$ based on the following rules.

* Print the coordinate with smaller $x$ first. In case of a tie, print the coordinate with smaller $y$ first.



The output values should be in a decimal fraction with an error less than 0.00001.

Examples

Input

1 1 1
6 2 2


Output

0.6153846154 1.9230769231
1.0000000000 0.0000000000
1.4183420913 1.9082895434
1.7355040625 0.3224796874


Input

1 2 1
4 2 2


Output

0.6666666667 1.0571909584
0.6666666667 2.9428090416
2.0000000000 2.0000000000


Input

1 2 1
3 2 2


Output

0.5000000000 1.1339745962
0.5000000000 2.8660254038


Input

0 0 1
1 0 2


Output

-1.0000000000 0.0000000000


Input

0 0 1
0 0 2


Output

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#include <cmath>

using namespace std;
typedef long long ll;
//typedef unsigned long long ll;

#define rep(i, n) for (int i = 0; i < (n); ++i)
//#define rep(i, n) for (ll i = 0; i < (n); ++i)
//#define sz(x) ll(x.size())
//typedef pair<ll, int> P;
//typedef pair<ll, ll> P;
//const double INF = 1e10;
//const ll INF = LONG_LONG_MAX / 100;
//const ll INF = (1ll << 31) - 1;
//const ll INF = 1e15;
const ll MINF = LONG_LONG_MIN;
//const int INF = INT_MAX / 10;
#define cmin(x, y) x = min(x, y)
#define cmax(x, y) x = max(x, y)
//typedef pair<int, int> P;
//typedef pair<double, double> P;

//bool contain(set<P> &s, P a) { return s.find(a) != s.end(); }

//ifstream myfile("C:\\Users\\riku\\Downloads\\0_00.txt");
//ofstream outfile("log.txt");
//outfile << setw(6) << setfill('0') << prefecture << setw(6) << setfill('0') << rank << endl;
// std::cout << std::bitset<8>(9);
const int mod = 1000000007;
typedef priority_queue<long long, vector<long long>, greater<long long>> PQ_ASK;


void print_line(vector<string> &line) {
    if (line.size() == 0ll) {
        cout << endl;
        return;
    }
    for (ll i = 0; i < line.size(); i++) {
        cout << line[i];
        if (i == line.size() - 1) cout << endl;
        else cout << ' ';
    }
}

#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)

#define double long double

struct Point {
    double x, y;

    Point(double x = 0, double y = 0) : x(x), y(y) {}

    Point operator+(Point p) { return Point(x + p.x, y + p.y); }

    Point operator-(Point p) { return Point(x - p.x, y - p.y); }

    Point operator*(double a) { return Point(a * x, a * y); }

    Point operator/(double a) { return Point(x / a, y / a); }

    double abs() { return sqrt(norm()); }

    double norm() { return x * x + y * y; }

    bool operator<(const Point &p) const {
        return x != p.x ? x < p.x : y < p.y;
    }

    bool operator==(const Point &p) const {
        return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
    }
};

struct Circle {
    Point c;
    double r;

    Circle(Point c = Point(), double r = 0.0) : c(c), r(r) {}
};

struct Line2d {
    double a, b, c;

    double eval(double x) {
        // fail when b is zero (= the line is orthogonal to x axis)
        return (-a * x - c) / b;
    }
};

double norm(Point a) {
    return a.x * a.x + a.y * a.y;
}

double abs(Point a) {
    return sqrt(norm(a));
}

double getDistance(Point a, Point b) {
    return abs(a - b);
}

void tangents(Point p, double r1, double r2, vector<Line2d> &v) {
    double r = r2 - r1;
    double z = p.x * p.x + p.y * p.y;
    double d = z - r * r;
    if (d < -EPS) return; // discriminant < 0 means there's no answer
    d = sqrt(d);
    Line2d l;
    l.a = (p.x * r + p.y * d) / z;
    l.b = (p.y * r - p.x * d) / z;
    l.c = r1;
    v.push_back(l);
}

vector<Line2d> commonTangents(Circle c1, Circle c2) {
    if (c1.r > c2.r) swap(c1, c2);
    vector<Line2d> ans;
    if (c1.c == c2.c && c1.r == c2.r) return ans;
    if (getDistance(c1.c, c2.c) < c2.r - c1.r) return ans;
    for (int i : {-1, 1}) {
        for (int j : {-1, 1}) {
            tangents(c2.c - c1.c, c1.r * i, c2.r * j, ans);
        }
    }
    for (int i = 0; i < ans.size(); i++) {
        ans[i].c -= ans[i].a * c1.c.x + ans[i].b * c1.c.y;
    }
    return ans;
}

struct Segment {
    Point p1, p2;

    Segment(Point p1, Point p2) : p1(p1), p2(p2) {}
};

typedef Segment Line;

typedef Point Vector;
typedef vector<Point> Polygon;

double arg(Vector p) {
    return atan2(p.y, p.x);
}


Vector polar(double a, double r) {
    return Point(a * cos(r), a * sin(r));
}

pair<Point, Point> getCrossPoints(Circle c1, Circle c2) {
    double d = abs(c1.c - c2.c);
    double a = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d));
    double t = arg(c2.c - c1.c);
    return make_pair(c1.c + polar(c1.r, t + a), c1.c + polar(c1.r, t - a));
}

double dot(Vector a, Vector b) {
    return a.x * b.x + a.y * b.y;
}


Point project(Segment s, Point p) {
    Vector base = s.p2 - s.p1;
    double r = dot(p - s.p1, base) / norm(base);
    return s.p1 + base * r;
}


pair<Point, Point> getCrossPoints(Circle c, Line l) {
    Vector pr = project(l, c.c);
    Vector e = (l.p2 - l.p1) / abs(l.p2 - l.p1);
    double base = sqrt(fabs(c.r * c.r - norm(pr - c.c)));
    return make_pair(pr + e * base, pr - e * base);
}


int main() {
    double a, b, c, d, e, f;
    cin >> a >> b >> c >> d >> e >> f;
    Circle c1(Point(a, b), c);
    Circle c2(Point(d, e), f);
    vector<Line2d> ans = commonTangents(c1, c2);
    vector<Point> res;
    for (Line2d x : ans) {
        Line l({0, 0}, {0, 0});
        if (x.b != 0) l = Line(Point(0, x.eval(0)), Point(1, x.eval(1)));
        else l = Line(Point(-x.c / x.a, 0), Point(-x.c / x.a, 1));
        res.push_back(getCrossPoints(c1, l).first);
    }
    sort(res.begin(), res.end());
    res.erase(unique(res.begin(), res.end()), res.end());
    cout << fixed << setprecision(12);
    for(Point p : res)  cout << p.x << " " << p.y << endl;

}