#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-6;
const int mod = 1000000007;
int modpow(int x, int y, int md = mod) {
  if (y == 0) return 1;
  int ret = modpow(x, y >> 1, md);
  ret = (long long)ret * ret % md;
  if (y & 1) ret = (long long)ret * x % md;
  return ret;
}
int n, m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int line = 1; line <= n / 2; line++) {
    int oppo = n + 1 - line;
    for (int j = 1; j <= m; j++) {
      cout << line << " " << j << '\n';
      cout << oppo << " " << m + 1 - j << '\n';
    }
  }
  if (n & 1) {
    for (int i = 1; i <= (m + 1) / 2; i++) {
      cout << (n + 1) / 2 << " " << i << '\n';
      if (m - i + 1 != i) cout << (n + 1) / 2 << " " << m - i + 1 << '\n';
    }
  }
  return 0;
}
