#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << 1 << " " << 1 << '\n';
    return;
  }
  for (int tr = 1; tr <= (n + 1) / 2; tr++) {
    int br = n - tr + 1;
    if (tr == br) {
      for (int j = 1; j <= m; j++) {
        if (m - j + 1 < j) break;
        cout << tr << " " << j << '\n';
        if (m - j + 1 == j) break;
        cout << tr << " " << m - j + 1 << '\n';
      }
      continue;
    }
    for (int j = 1; j <= m; j++) {
      cout << tr << " " << j << '\n';
      cout << br << " " << m - j + 1 << '\n';
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
