#include<bits/stdc++.h>
using namespace std;
int main (){
int a,b,c,d,e,f;
cin >> a >> b >> c >> d >> e >> f;
if(a>=60 && b>=60 || a>=60 && b>=60 || b>=60 && c>=60){
cout << "PASS" << endl;
}else{
cout << "FAIL" << endl;
}
if(60>double((ad+be+c*f)/(d+e+f))){
cout << "FAIL";
}else{
cout << "PASS";
}
return 0;
}
#3不通过