Curly brackets and parentheses

Write a program that reads a sequence of words with curly brackets and
parentheses, and for each one prints if the curly brackets and the
parentheses close correctly.

Input

Input is a sequence of words consisting of |’[’|, |’]’|, |’(’| and
|’)’|.

Output

For each word, print “yes” or “no” depending on if the curly brackets
and the parentheses close correctly or not.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T12:11:24.189Z

© Jutge.org, 2006–2026.
https://jutge.org
