#include<iostream> using namespace std; int main() { cout<<4<<endl<<4<<endl<<8<<endl<<1<<endl<<1<<endl<<18; }