#include <algorithm>
#include <iostream>
#include <vector>

int main()
{
    std::vector<int> choice(4);
    for(int i = 0; i < 4; ++i) {
        std::cin >> choice[i];
    }
    std::sort(std::begin(choice), std::end(choice));
    if(choice == std::vector<int>{ 1, 3, 4, 6 }) { // 1, 3, 4, 6 should be sorted.
        // equal
        std::cout << "equal\n";
    } else {
        // different
        std::cout << "different\n";
    }

}
