\problemname{Find Poly}

\illustration{0.2}{findpoly/problem_statement/findpoly.png}{}

Consider a set of line segments in a 2D plane.

For any set of line segments $L$, define $P(L)$ as the set of all
endpoints of the line segments in $L$.

Two line segments are said to be \textit{connected} if they share an
endpoint.

Given a set of line segments $U$, we say that a \textit{geometric
figure} (``figure'' for short) is a set $S$ of one or more line
segments, $S \subseteq U$, for which
\begin{enumerate}
\item for any two points $p_1$ and $p_2$ in $P(S)$, we can reach
$p_2$ from $p_1$ by tracing along one or more connected line segments, and
\item for every line segment $e$ in $S$, all line segments of $U$
that are connected to $e$ are also in $S$.
\end{enumerate}

A \textit{polygon} is a geometric figure $S$ for which it is possible
to trace a path starting from some endpoint $p$ and ending at $p$
using every line segment in $S$ exactly once and visiting each point
in $P(S)$ other than $p$, exactly once, visiting $p$ only at the
beginning and end of the path.

See figure 1 which has 10 figures of which $a$, $b$, $e$, and $f$ are
polygons. The dots are the end points of the line segments.

\begin{figure}
\includegraphics[width=\linewidth]{findpoly/problem_statement/fig1.pdf}
\caption{10 figures, 4 polygons\label{polyAndFigs}}
\end{figure}

Note that $b$ is self-intersecting but that the intersection is not at the
end points of the intersecting line segments. Similarly $c$ and $d$ as well
as $e$ and $f$ intersect but are not connected.

Your task is to count the total number of figures and identify how many are
polygons.


\section*{Input}

The input is a series of lines terminated by end-of-file. Each line will
have one or more line segments of the form:

\begin{verbatim}
    (x1,y1),(x2,y2);
\end{verbatim}

where \texttt{(x1,y1)} is one end point and \texttt{(x2,y2)} is the
other end point.  $0 \leq x1, y1, x2, y2 \leq 99$.  All coordinates
are integers.

The separator characters, ``(),;'', may be preceded
or followed by white space.  A line may be at most $100$ characters
long.

There will be at most $200$ line segments.  A given line segment will
only appear once in the input and none will be of length $0$.

Line segments are not directed so the order of the end points in the
line segment is not significant. The order of the line segments in
the input is also not significant.


\section*{Output}

Print a single line containing two integers separated by a single
space. The first number should be the total number of figures and the
second should be the number of polygons found.

\section*{Examples}

In the first example below, the points correspond to the picture in
Figure~\ref{polyAndFigs}.

