The article discusses the method of solving the task 18 on the Unified State Examination in Informatics (Russian EGE). The main idea of the method is to write the conditions of the problem utilizing the language of formal logic, using elementary predicates. According to the laws of logic the resulting complex logical expression would be transformed into an expression, according to which a geometric model is supposed to be constructed which allows to obtain an answer. The described algorithm does allow high complexity problem to be converted into a simple one.