#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << 1 << " " << 1 << "\n";
    return 0;
  }
  for (long long i = 1; i <= n / 2; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << i << " " << j << "\n";
      cout << n - i + 1 << " " << m - j + 1 << "\n";
    }
  }
  if (n % 2 == 1) {
    for (long long i = 1; i <= m / 2; i++) {
      cout << n / 2 + 1 << " " << i << "\n";
      cout << n / 2 + 1 << " " << m - i + 1 << "\n";
    }
    if (m % 2 == 1) {
      cout << n / 2 + 1 << " " << m / 2 + 1 << "\n";
    }
  }
}
