#include <bits/stdc++.h>
using namespace std;
const double q = (sqrt(5.0) + 1) / 2;
const long long MAXX = 10000000000000000LL;
const int maxn = 1000000;
long long a[maxn], b[maxn];
int main() {
  string s, t;
  cin >> s >> t;
  int n = s.length();
  int m = t.length();
  for (int i = 0; i < s.length(); i++) {
    a[i] = s[n - i - 1] - '0';
  }
  for (int i = 0; i < t.length(); i++) {
    b[i] = t[m - i - 1] - '0';
  }
  for (int i = max(n, m) + 10; i >= 0; i--) {
    if (a[i] > MAXX) {
      cout << ">" << endl;
      return 0;
    }
    if (b[i] > MAXX) {
      cout << "<" << endl;
      return 0;
    }
    if (i == 1) {
      if (a[0] == b[0] && a[1] == b[1]) {
        cout << "=" << endl;
        return 0;
      } else {
        double aa = a[1] * q + a[0];
        double bb = b[1] * q + b[0];
        if (aa < bb) {
          cout << "<" << endl;
        } else {
          cout << ">" << endl;
        }
        return 0;
      }
    }
    if (a[i] > b[i]) {
      a[i - 1] += a[i] - b[i];
      a[i - 2] += a[i] - b[i];
    } else {
      b[i - 1] += b[i] - a[i];
      b[i - 2] += b[i] - a[i];
    }
  }
  return 0;
}
