#include <bits/stdc++.h>
using namespace std;
int n, m;
int cn, cm, i, j, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  j = 1;
  while (j < n - j + 1) {
    for (i = 1; i < m + 1; ++i) {
      {
        cout << j << " " << i << '\n';
        cout << n - j + 1 << " " << m - i + 1 << '\n';
      }
    }
    ++j;
  }
  if (n % 2 != 0) {
    cn = 1;
    cm = m;
    int hehe = (n / 2) + 1;
    for (k = 0; k < m; ++k) {
      if (k % 2 == 0) {
        cout << hehe << " " << cn << '\n';
        ++cn;
      } else {
        cout << hehe << " " << cm << '\n';
        --cm;
      }
    }
  }
}
