import java.util.*;
public class Main {
static int getDistance(char[] a, int m, char[] b, int n) {
int[][] f = new int[m+1][n+1];
for(int i=0; i <= m; i++) f[i][0] = i;
for(int j=0; j <= n; j++) f[0][j] = j;
for(int i=1; i <= m; i++) {
for(int j=1; j <= n; j++) {
f[i][j] = f[i-1][j-1];
if(a[i-1] != b[j-1]) {
f[i][j] ++;
f[i][j] = Math.min(f[i][j], f[i-1][j]+1);
f[i][j] = Math.min(f[i][j], f[i][j-1]+1);
}
}
}
return f[m][n];
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
char[] a = sc.next().toCharArray();
char[] b = sc.next().toCharArray();
int m = a.length, n = b.length;
int distance = getDistance(a, m, b, n);
System.out.println("1/"+(distance+1));
}
}
}
/*
f[i][j] 表示串a[0,...,i-1] 和b[0,...,j-1] 的最小编辑距离。
如果 a[i-1] == b[i-1],
f[i][j] = f[i-1][j-1]
如果 a[i-1] != b[i-1],
f[i][j] = f[i-1][j-1] + 1
如果 a[i-1] != b[i-1],可以删除a中的一个字符
f[i][j] = f[i-1][j] + 1
如果 a[i-1] != b[i-1],可以删除b中的一个字符
f[i][j] = f[i][j-1] + 1
*/