Rhyming Verses

No attempts yetTime limit1sMemory limit512 MB

Problem

Bajtazar has taken up writing poetry. He is an innovative and original author, and his main difficulty is choosing words and lines so that they rhyme.

Bajtazar considers two lines to rhyme when both of the following hold:

  • They contain the same number of vowels (the vowels are the letters a, e, i, o, u, and y).
  • The fragments made of their last kk letters (ignoring spaces) are identical.

A line made of fewer than kk letters is too short to be treated as rhyming with anything.

Your task is to determine how many of the given pairs of lines rhyme, according to Bajtazar's definition.

Input

The first line of standard input contains two integers nn and kk (1n10001 \le n \le 1000, 1k10001 \le k \le 1000): the number of line pairs to check and the length of the ending fragment that decides whether two lines may rhyme.

The next 2n2n lines contain the pairs of lines. Each line is written on its own row and consists of lowercase English letters and spaces.

The length of a line (including spaces) never exceeds 20002000. You may assume that in at least 80% of the test data no line contains any spaces; in the remaining cases spaces can appear, so your program must handle them.

Output

Print a single integer: the number of rhyming pairs of lines.