#include<bits/stdc++.h>
using namespace std;
int main()
{
int a1, a2, b1, b2, c1, c2, d1, d2, e1, e2, f1, f2;
while(cin >> a1 >> a2 >> b1 >> b2 >> c1 >> c2 >> d1 >> d2 >> e1 >> e2 >> f1 >> f2)
{
int i;
float a[6];
a[0] = (a1/1000.0)*(a2/1000.0);
a[1] = (b1/1000.0) * (b2/1000.0);
a[2] = (c1/1000.0)*(c2/1000.0);
a[3] = (d1/1000.0)*(d2/1000.0);
a[4] = (e1/1000.0)* (e2/1000.0);
a[5] = (f1/1000.0)*(f2/1000.0);
sort(a, a+6);
if(a[0] == a[1] && a[2] == a[3] && a[4] == a[5])
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
return 0;
}
using namespace std;
int main()
{
int a1, a2, b1, b2, c1, c2, d1, d2, e1, e2, f1, f2;
while(cin >> a1 >> a2 >> b1 >> b2 >> c1 >> c2 >> d1 >> d2 >> e1 >> e2 >> f1 >> f2)
{
int i;
float a[6];
a[0] = (a1/1000.0)*(a2/1000.0);
a[1] = (b1/1000.0) * (b2/1000.0);
a[2] = (c1/1000.0)*(c2/1000.0);
a[3] = (d1/1000.0)*(d2/1000.0);
a[4] = (e1/1000.0)* (e2/1000.0);
a[5] = (f1/1000.0)*(f2/1000.0);
sort(a, a+6);
if(a[0] == a[1] && a[2] == a[3] && a[4] == a[5])
cout << "POSSIBLE" << endl;
else
cout << "IMPOSSIBLE" << endl;
}
return 0;
}
Comments
Post a Comment