#include<iostream>
using namespace std;

int main()
{
 int age;
 char isfriend;

 // Get user age and friend-status
 cout << "What is your age? ";
 cin >> age;
 cout << "Are you a friend of the driver? ";
 cin >> isfriend;

 // check if young child or senior citizen
 if (age<3 || age>70 || isfriend=='Y')
   cout << "Free ride!\n";
 else
   cout << "Pay $5!\n";

 return 0;
}