#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 7;
const long long mod = 998244353;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<long long> v;
  long long n, m;
  cin >> n >> m;
  for (int i = 0; i < n / 2; i++) {
    long long r = i + 1;
    for (int j = 0; j < m; j++) {
      cout << r << " " << j + 1 << "\n";
      cout << n - r + 1 << " " << m - j << "\n";
    }
  }
  if (n % 2 == 1) {
    long long idx = n / 2 + 1;
    long long dx = 0;
    long long k = 1;
    long long s = m - 1;
    for (int i = 0; i < m; i++) {
      k = k + dx;
      cout << idx << " " << k << "\n";
      if (i % 2 == 0)
        dx = s;
      else
        dx = -s;
      s--;
    }
  }
  return 0;
}
