#include<iostream>
using namespace std;
int main()
{
int a,b,c,a1,b1,c1;
cin>>a>>b>>c>>a1>>b1>>c1;
if(a>60 || b>60 || c>60)
{
cout<<"PASS"<<endl;
}
else
{
cout<<"FAIL"<<endl;
}
if((a*a1+b*b1+c*c1)/(a1+b1+c1)>60)
{
cout<<"PASS";
}
else
{
cout<<"FAIL";
}
return 0;
}
求指点叻