\begin{tutorial}{Sleepy Sasha is Trouble at the University}

\begin{center}
\begin{tabular}{rl}
\textbf{Problem Author}: & \textbf{Pavlo Tsitsei} \\
\textbf{Prepared by}: & \textbf{Pavlo Tsitsei, Bohdan Feysa} \\
\textbf{Tutorial by}: & \textbf{Pavlo Tsitsei} 
\end{tabular} 
\end{center}

Let's convert all the time into minutes. Then, in a day, there are 1800 minutes, the classes will take $x\cdot 90$ minutes in total, and the homework will take $\sum_{i=1}^n a_i$ minutes. Therefore, the total remaining time is $1800-x\cdot 90-\sum_{i=1}^n a_i$. If the answer is negative, then -1 should be output. Otherwise, the output should be the number of hours and minutes, which is the total number of minutes divided by 60 and the remainder of the division by 60.

\end{tutorial}
