package main
import (
"fmt"
"strings"
)
func isRotation(s1, s2 string) bool {
return len(s1) == len(s2) && strings.Contains(s1 + s1, s2)
}
func main() {
s1 := "abbc"
s2 := "cabb"
if isRotation(s1, s2) {
fmt.Println("yes")
} else {
fmt.Println("no")
}
s1 = "abbc"
s2 = "bbac"
if isRotation(s1, s2) {
fmt.Println("yes")
} else {
fmt.Println("no")
}
}
/*
run:
yes
no
*/