#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(NULL);
  long long n, y, x, z, h, max = 0, m, t, i, j, k, cnt = 0, cnt1 = 0, sum = 0,
                           flag = 0, flag1 = 0;
  cin >> n >> m;
  long long l, r;
  l = 1;
  r = m;
  while (l <= r) {
    if (l < r) {
      for (i = 1; i <= n; ++i) {
        cout << i << " " << l << "\n";
        cout << n - i + 1 << " " << r << "\n";
        cnt += 2;
      }
    } else {
      for (i = 1; i <= n / 2; ++i) {
        cout << i << " " << l << "\n";
        cout << n - i + 1 << " " << l << "\n";
        cnt += 2;
      }
      if (n % 2 == 1) {
        cout << (n / 2) + 1 << " " << l << "\n";
        cnt++;
      }
    }
    l++;
    r--;
  }
  return 0;
}
