#include "testlib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t = 0, correct = 0;
bool isSame(string &s1, string &s2) {
    while (s1.length() > 0 && s1.back() == ' ' || s1.back() == '\t')
        s1.pop_back();
    while (s2.length() > 0 && s2.back() == ' ' || s2.back() == '\t')
        s2.pop_back();
    int i = 0, j = 0;
    while (i < s1.length() && (s1[i] == ' ' || s1[i] == '\t'))
           i++;

    while (j < s2.length() && (s2[j] == ' ' || s2[j] == '\t'))
           j++;

    while (i < s1.length()) {
        if (s1[i] == ' ' || s1[i] == '\t') {
            if (j >= s2.length() || (s2[j] != ' ' && s2[j] != '\t'))
                return 0;
            while (i < s1.length() && (s1[i] == ' ' || s1[i] == '\t'))
                i++;
            while (j < s2.length() && (s2[j] == ' ' || s2[j] == '\t'))
                j++;
        } else {
            if (j >= s2.length() || s1[i] != s2[j]) return 0;
            i++;
            j++;
        }
    }
    if (j < s2.length()) return 0;
    return 1;
}
void check() {
    string s1, s2;

    while (!ans.eof()) {
        s1 = ans.readLine();
        t++;
        if (!ouf.eof()) {
            s2 = ouf.readLine();
            correct += isSame(s1, s2);
        }
    }
    quitp(100.0 * correct / t, "Dung %d tren tong so %d", correct, t);
}
int main(int c, char **v) {
    registerTestlibCmd(c, v);
    check();
    return 0;
}
