%{
#include<stdio.h>
int v=0, c=0;
%}

%%
[ \t\n]+        ;        /* ignore spaces */
[AEIOUaeiou]    { v++; } /* vowels */
[B-DF-HJ-NP-TV-Zb-df-hj-np-tv-z] { c++; } /* consonants */
.               ;        /* ignore others */
%%

int main(){
  printf("Enter the input string: ");
  yylex();
  printf("\nNo of vowels are : %d", v);
  printf("\nNo of consonants are : %d", c);
  return 0;
}

int yywrap(){
  return 1;
}