A data importer receives a CSV blob. Fields are separated by commas and records are separated by line breaks, but a line break inside a double-quoted field does not end the record. Quoting rules: a field may be wrapped in double quotes "; inside a quoted field, commas and line breaks are literal, and a pair "" represents one literal double-quote character. Every quoted field is fully wrapped, every " is a wrapping quote or part of a "" pair, an unquoted field never contains a quote, and the blob does not end with a trailing line break.
You are given the blob as a count of physical lines followed by those lines (which, joined back with single line breaks, reconstruct the blob). Report the number of records and the total number of fields across all records.
Input format
Line 1: an integer p, the number of physical lines in the blob.
Next p lines: the physical lines of the CSV blob. Joining them with a single line break between consecutive lines reconstructs the exact blob.
Output format
A single line with two space-separated integers: the number of records and the total number of fields.
Constraints
- 1 <= p <= 40
- The reconstructed blob has length at most 2000 and encodes at least one record.
- Quoting follows the rules above; the blob does not end with a line break.