#include<iostream>
#include<string.h>
#include<algorithm>
#include<vector>
#include<math.h>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c,d,e,f,count=0;
cin>>a>>b>>c>>d>>e>>f;
if(a<60)
count++;
if(b<60)
count++;
if(c<60)
count++;
if(count>1)
cout<<"FALL"<<endl;
else
cout<<"PASS"<<endl;
if(((a*d+b*e+c*f)*1.0/(d+e+f))<60.0)
cout<<"FALL";
else
cout<<"PASS";
return 0;
}