import java.io.*;
import java.util.*;

class CompteDiff {

public static void main(String[] args) {
	try {
		Reader r=new FileReader(args[0]);
		StreamTokenizer st=new StreamTokenizer (r);	
		st.whitespaceChars('.','.') ;
			
		Set mots = new HashSet();
		int nbMots = 0;
		
		while (st.nextToken()!=st.TT_EOF) {
			if (st.ttype== st.TT_WORD) {
				nbMots++;
				mots.add(st.sval);
	        } // if
	     } // while
	     r.close();
	     System.out.println("Nb. de mots: " +nbMots);
	     System.out.println(" Differents: "+mots.size());
	     
	}
	catch (FileNotFoundException e) {System.out.println("Fichier non trouve");}
	catch (IOException e) {System.out.println("Erreur de lecture");}
}
}