#include<iostream>
using namespace std;


int main()
{
 // Declare number list and query number
 int numList[5], query;

 // Input number list
 cout << "Input five numbers: ";
 int i=0;
 while(i<5)
 {
   cin >> numList[i];
   i++;
 }

 // Enter query number
 cout << "Input another number: ";
 cin >> query;

 // Search for query number in list
 bool hasNumber=false;
 i=0;
 while(i<5)
 {
   if (numList[i]==query)
     hasNumber=true;
   i++;
 }

 // Report if nmber present
 cout << query << " is ";
 if(!hasNumber)
   cout << "not ";
 cout << "in list\n";


 return 0;
}