Problem:
Score : 200 points

Problem Statement

You are given a string S consisting of lowercase English letters. Determine whether all the characters in S are different.

Constraints

2 ≤ |S| ≤ 26, where |S| denotes the length of S.

S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If all the characters in S are different, print yes (case-sensitive); otherwise, print no.

Sample Input 1

uncopyrightable

Sample Output 1

yes

Sample Input 2

different

Sample Output 2

no

Sample Input 3

no

Sample Output 3

yes

Solution in Scala (2.11.7) (judge verdict: Accepted)

object Main extends App {
	val x = scala.io.StdIn.readLine.toList
	
	def head(x: List[Char]): List[Char] = {
		x match {
			case x::rest => rest
			case _ => List()
		}
	}

	def match2(x: List[Char]): Boolean = {
		var temp = x;
		var y :List[Char] = List()
		val size = x.size

		for(i<- 0 until size){
			if(! y.contains(x(i))){
				y = x(i) :: y
				temp = head(temp) 
			}else{
				return true
			}
		}
		return false
	}

	if(match2(x)){
		println("no")
	}else{
		println("yes")
	}

}