#include <bits/stdc++.h>
using namespace std;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const long double EPS = 1e-10;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < m; j++) {
      cout << i + 1 << " " << j + 1 << nl;
      cout << n - i << " " << m - j << nl;
    }
  }
  if (n % 2) {
    for (int j = 0; j < m / 2; j++) {
      cout << n / 2 + 1 << " " << j + 1 << nl;
      cout << n / 2 + 1 << " " << m - j << nl;
    }
    if (m % 2) {
      cout << n / 2 + 1 << " " << m / 2 + 1 << nl;
    }
  }
  return 0;
}
